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:
parent
5a8639b5b6
commit
76dbf62375
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user