diff --git a/ground/src/plugins/opmap/opmap_widget.ui b/ground/src/plugins/opmap/opmap_widget.ui index c6413cb9c..e9884c7ad 100644 --- a/ground/src/plugins/opmap/opmap_widget.ui +++ b/ground/src/plugins/opmap/opmap_widget.ui @@ -871,7 +871,7 @@ background-color: qlineargradient(spread:pad, x1:1, y1:0.5, x2:0, y2:0.5, stop:0 color: rgb(255, 255, 255); } QToolButton:pressed { -background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(48, 48, 48, 255), stop:1 rgba(180, 180, 180, 255)); +background-color: qlineargradient(spread:pad, x1:1, y1:0.5, x2:0, y2:0.5, stop:0 rgba(71, 71, 71, 0), stop:0.5 rgba(48, 48, 48, 255), stop:1 rgba(71, 71, 71, 0)); color: rgb(255, 255, 255); } diff --git a/ground/src/plugins/opmap/opmapgadgetwidget.cpp b/ground/src/plugins/opmap/opmapgadgetwidget.cpp index cc6bc1823..7c527fdac 100644 --- a/ground/src/plugins/opmap/opmapgadgetwidget.cpp +++ b/ground/src/plugins/opmap/opmapgadgetwidget.cpp @@ -1097,18 +1097,23 @@ void OPMapGadgetWidget::onFollowUAVpositionAct_toggled(bool checked) { if (m_widget) { - if (m_widget->toolButtonMapUAV->isChecked() != followUAVpositionAct->isChecked()) - m_widget->toolButtonMapUAV->setChecked(followUAVpositionAct->isChecked()); + if (m_widget->toolButtonMapUAV->isChecked() != checked) + m_widget->toolButtonMapUAV->setChecked(checked); if (m_map) - m_map->SetRotate(0); // reset the rotation to '0' + { + m_map->SetCanDragMap(!checked); // allow/disallow manual map dragging + if (!checked) m_map->SetRotate(0); // reset map rotation to 0deg + } } } void OPMapGadgetWidget::onFollowUAVheadingAct_toggled(bool checked) { - if (!checked && m_map) - m_map->SetRotate(0); // reset the rotation to '0' + if (m_map) + { + if (!checked) m_map->SetRotate(0); // reset map rotation to 0deg + } } void OPMapGadgetWidget::onOpenWayPointEditorAct_triggered()