mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Bring a modal window back to front when opening a dialog
Otherwise it can happen the modal window in background blocks the other UI.
This commit is contained in:
@@ -31,8 +31,10 @@ namespace BlackGui
|
||||
|
||||
void CAircraftModelSetValidationDialog::validatedModelSet(const CSimulatorInfo &simulator, const CAircraftModelList &valid, const CAircraftModelList &invalid, bool stopped, const CStatusMessageList &msgs)
|
||||
{
|
||||
if (!sGui) { return; }
|
||||
ui->comp_AircraftModelValidation->validatedModelSet(simulator, valid, invalid, stopped, msgs);
|
||||
this->setWindowTitle(QStringLiteral("Model validation for '%1'").arg(simulator.toQString(true)));
|
||||
CGuiApplication::modalWindowToFront();
|
||||
}
|
||||
|
||||
bool CAircraftModelSetValidationDialog::event(QEvent *event)
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
*/
|
||||
|
||||
#include "autopublishdialog.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "ui_autopublishdialog.h"
|
||||
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
@@ -33,8 +35,8 @@ namespace BlackGui
|
||||
{
|
||||
const int r = ui->comp_AutoPublish->readFiles();
|
||||
this->show();
|
||||
CGuiApplication::modalWindowToFront();
|
||||
return r;
|
||||
}
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace BlackGui
|
||||
bool CDbLoadDataDialog::newerOrEmptyEntitiesDetected(CEntityFlags::Entity loadEntities)
|
||||
{
|
||||
this->show();
|
||||
CGuiApplication::modalWindowToFront();
|
||||
if (m_consolidating) { return false; }
|
||||
if (m_pendingEntities != CEntityFlags::NoEntity) { return false; } // already loading
|
||||
if (loadEntities == CEntityFlags::NoEntity) { return false; }
|
||||
|
||||
Reference in New Issue
Block a user