1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP37/GCS Small fixes

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@942 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
zedamota 2010-06-29 20:27:12 +00:00 committed by zedamota
parent 5a8639b5b6
commit 76dbf62375

View File

@ -213,7 +213,7 @@ namespace mapcontrol
////////////////////////////////////////////// //////////////////////////////////////////////
void OPMapWidget::SetShowCompass(const bool &value) void OPMapWidget::SetShowCompass(const bool &value)
{ {
if(value) if(value && !compass)
{ {
compass=new QGraphicsSvgItem(QString::fromUtf8(":/markers/images/compas.svg")); compass=new QGraphicsSvgItem(QString::fromUtf8(":/markers/images/compas.svg"));
compass->setScale(0.1+0.05*(qreal)(this->size().width())/1000*(qreal)(this->size().height())/600); compass->setScale(0.1+0.05*(qreal)(this->size().width())/1000*(qreal)(this->size().height())/600);
@ -229,6 +229,7 @@ namespace mapcontrol
if(!value && compass) if(!value && compass)
{ {
delete compass; delete compass;
compass=0;
} }
} }
void OPMapWidget::SetRotate(qreal const& value) void OPMapWidget::SetRotate(qreal const& value)