mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
[UI] Avoid too many ("deadlocking") modal dialogs
This commit is contained in:
committed by
Mat Sutcliffe
parent
21a5c07e02
commit
b1315593f8
@@ -485,6 +485,15 @@ void SwiftGuiStd::onValidatedModelSet(const CSimulatorInfo &simulator, const CAi
|
||||
{
|
||||
// will NOT be called if no errors and setting is "only on errors"
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
if (QApplication::activeModalWidget())
|
||||
{
|
||||
// avoid too many "deadlocking" dialogs, display warning instead
|
||||
if (invalid.isEmpty()) { return; }
|
||||
const CStatusMessage m = CLogMessage(this).validationWarning(u"Model set validation has found %1 invalid models for '%2', check the model validation") << invalid.size() << simulator.toQString(true);
|
||||
this->displayInOverlayWindow(m, 5000);
|
||||
return;
|
||||
}
|
||||
|
||||
this->displayValidationDialog();
|
||||
m_validationDialog->validatedModelSet(simulator, valid, invalid, stopped, msgs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user