1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

GCS-Map fixes

Find place now works when the user presses enter
Find place goes to zoom level 12.
Don't go to UAV position on HW connect if "follow UAV" mode is not set
This commit is contained in:
PT_Dreamer 2012-10-04 12:32:30 +01:00
parent ac8d399d8d
commit 29111b3529
2 changed files with 12 additions and 2 deletions

View File

@ -866,8 +866,10 @@ void OPMapGadgetWidget::onTelemetryConnect()
setHome(internals::PointLatLng(LLA[0], LLA[1]),LLA[2]);
if (m_map)
m_map->SetCurrentPosition(m_home_position.coord); // set the map position
{
if(m_map->UAV->GetMapFollowType()!=UAVMapFollowType::None)
m_map->SetCurrentPosition(m_home_position.coord); // set the map position
}
// ***********************
}
@ -2167,6 +2169,7 @@ void OPMapGadgetWidget::on_tbFind_clicked()
{
pal.setColor( m_widget->leFind->backgroundRole(), Qt::green);
m_widget->leFind->setPalette(pal);
m_map->SetZoom(12);
}
else
{
@ -2188,3 +2191,8 @@ void OPMapGadgetWidget::onOverlayOpacityActGroup_triggered(QAction *action)
m_map->setOverlayOpacity(action->data().toReal()/100);
emit overlayOpacityChanged(action->data().toReal()/100);
}
void OPMapGadgetWidget::on_leFind_returnPressed()
{
on_tbFind_clicked();
}

View File

@ -212,6 +212,8 @@ private slots:
void on_tbFind_clicked();
void onHomeDoubleClick(HomeItem*);
void onOverlayOpacityActGroup_triggered(QAction *action);
void on_leFind_returnPressed();
private:
int m_min_zoom;
int m_max_zoom;