]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/LocationWidget.cxx
Fix re-selection of start location.
[flightgear.git] / src / GUI / LocationWidget.cxx
index 4c3048cd4d8cba9057d84ec59e03373dc1e9e025..a1282ed39ca47d0a4540c4ae882502333ee734f2 100644 (file)
@@ -995,8 +995,12 @@ void LocationWidget::onShowHistory()
 void LocationWidget::setBaseLocation(FGPositionedRef ref)
 {
     m_locationIsLatLon = false;
-    if (m_location == ref)
+// don't change location if we're on the same location. We must check
+// the current stack index, otherwise there's no way back into the same
+// location after using the back button.
+    if ((m_location == ref) && (m_ui->stack->currentIndex() != 2)) {
         return;
+    }
 
     m_location = ref;
     onLocationChanged();