1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

Disabled manual mouse map dragging when map is locked onto the UAV (follow UAV mode).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@990 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2010-07-03 07:54:25 +00:00 committed by pip
parent 49d19222c3
commit d007478f02
2 changed files with 11 additions and 6 deletions

View File

@ -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);
}
</string>

View File

@ -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()