Avoid shutdown if modal window closes

See https://discordapp.com/channels/539048679160676382/567139633964646411/613564665255034903
This commit is contained in:
Klaus Basan
2019-08-22 00:32:02 +02:00
committed by Mat Sutcliffe
parent d9948af103
commit 92f3dd392f

View File

@@ -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