From 43add4f820300833024366cb58cfedb90bfbe5a0 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 14 Apr 2016 18:54:27 +0100 Subject: [PATCH] Fix stray back-button in Qt launcher MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - when no location is set, don’t show the back button. --- src/GUI/LocationWidget.cxx | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- 2.39.5