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

LP-572 Apply HomeLocation only when OK button pressed (ignored on Cancel)

This commit is contained in:
Laurent Lalanne 2018-01-03 23:19:43 +01:00
parent f51e7d3688
commit fd92c900a8

View File

@ -1790,9 +1790,10 @@ void OPMapGadgetWidget::onSetHomeAct_triggered()
altitude = QInputDialog::getDouble(this, tr("Set home altitude"),
tr("In [m], referenced to WGS84:"), altitude, -100, 100000, 2, &ok);
setHome(m_context_menu_lat_lon, altitude);
setHomeLocationObject(); // update the HomeLocation UAVObject
if (ok) {
setHome(m_context_menu_lat_lon, altitude);
setHomeLocationObject(); // update the HomeLocation UAVObject
}
}
void OPMapGadgetWidget::onGoHomeAct_triggered()