From 92f3dd392f5758e4f2822ae3abeef3c3d7b34341 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 22 Aug 2019 00:32:02 +0200 Subject: [PATCH] Avoid shutdown if modal window closes See https://discordapp.com/channels/539048679160676382/567139633964646411/613564665255034903 --- src/blackgui/components/flightplancomponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blackgui/components/flightplancomponent.cpp b/src/blackgui/components/flightplancomponent.cpp index 5cfd6f274..aa2fb4133 100644 --- a/src/blackgui/components/flightplancomponent.cpp +++ b/src/blackgui/components/flightplancomponent.cpp @@ -555,7 +555,7 @@ namespace BlackGui void CFlightPlanComponent::loadFromDisk() { CStatusMessageList msgs; - const QString fileName = QFileDialog::getOpenFileName(nullptr, tr("Load flight plan"), this->getDefaultFilename(true), "Flight plans (*.json *.sfp *.vfp *.xml);;swift (*.json *.txt);;SimBrief (*.xml);;vPilot (*.vfp);;SB4 (*.sfp)"); + const QString fileName = QFileDialog::getOpenFileName(this, tr("Load flight plan"), this->getDefaultFilename(true), "Flight plans (*.json *.sfp *.vfp *.xml);;swift (*.json *.txt);;SimBrief (*.xml);;vPilot (*.vfp);;SB4 (*.sfp)"); if (fileName.isEmpty()) { return; } CFlightPlan fp = CFlightPlan::loadFromMultipleFormats(fileName, &msgs); if (!fp.hasCallsign()) { fp.setCallsign(ui->le_Callsign->text()); } // set callsign if it wasn't set