mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +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:
@@ -60,6 +60,7 @@
|
||||
#include <QSysInfo>
|
||||
#include <QUrl>
|
||||
#include <QWidget>
|
||||
#include <QWindow>
|
||||
#include <QMainWindow>
|
||||
#include <QtGlobal>
|
||||
#include <QWhatsThis>
|
||||
@@ -357,6 +358,12 @@ namespace BlackGui
|
||||
return s->geometry();
|
||||
}
|
||||
|
||||
void CGuiApplication::modalWindowToFront()
|
||||
{
|
||||
if (!QGuiApplication::modalWindow()) { return; }
|
||||
QGuiApplication::modalWindow()->raise();
|
||||
}
|
||||
|
||||
bool CGuiApplication::saveWindowGeometryAndState(const QMainWindow *window) const
|
||||
{
|
||||
if (!window) { return false; }
|
||||
|
||||
Reference in New Issue
Block a user