From: James Turner Date: Thu, 14 Apr 2016 17:54:27 +0000 (+0100) Subject: Fix stray back-button in Qt launcher X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=43add4f820300833024366cb58cfedb90bfbe5a0;p=flightgear.git Fix stray back-button in Qt launcher - when no location is set, don’t show the back button. --- diff --git a/src/GUI/LocationWidget.cxx b/src/GUI/LocationWidget.cxx index 4d5515cc9..162a7c5d9 100644 --- a/src/GUI/LocationWidget.cxx +++ b/src/GUI/LocationWidget.cxx @@ -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) {