]> git.mxchange.org Git - flightgear.git/commitdiff
Fix stray back-button in Qt launcher
authorJames Turner <zakalawe@mac.com>
Thu, 14 Apr 2016 17:54:27 +0000 (18:54 +0100)
committerJames Turner <zakalawe@mac.com>
Thu, 14 Apr 2016 17:54:27 +0000 (18:54 +0100)
- when no location is set, don’t show the back button.

src/GUI/LocationWidget.cxx

index 4d5515cc91c272ab8880066a76ddff5fd4738175..162a7c5d9fcf4d0910cde7b076125d203680d459 100644 (file)
@@ -668,6 +668,11 @@ void LocationWidget::onSearchComplete()
 void LocationWidget::onLocationChanged()
 {
     bool locIsAirport = FGAirport::isAirportType(m_location.ptr());
+    if (!m_location) {
+        onBackToSearch();
+        return;
+    }
+
     m_backButton->show();
 
     if (locIsAirport) {