File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1414
1515#include < util/Icon.h>
1616
17+ #include < ModalTask.h>
18+ #include < ModalTaskHandler.h>
19+
1720#include < QProxyStyle>
1821#include < QStyleFactory>
1922#include < QSurfaceFormat>
2225#include < QTemporaryDir>
2326#include < QFileInfo>
2427
25- #include " private/ErrorLoggingConsentDialog.h"
26-
2728using namespace mv ;
2829using namespace mv ::util;
2930using namespace mv ::gui;
@@ -247,6 +248,8 @@ int main(int argc, char *argv[])
247248
248249 loadGuiTask.setSubtaskFinished (" Apply styles" );
249250
251+ ModalTask::getGlobalHandler ()->setEnabled (true );
252+
250253 MainWindow mainWindow;
251254
252255 loadGuiTask.setSubtaskStarted (" Create main window" );
Original file line number Diff line number Diff line change @@ -69,7 +69,10 @@ void ModalTaskHandler::updateDialogVisibility()
6969 _modalTasksDialog.close ();
7070
7171 if (numberOfModalTasks >= 1 && !_modalTasksDialog.isVisible ()) {
72- const auto mainWindowGeometry = Application::getMainWindow ()->geometry ();
72+ auto mainWindow = Application::getMainWindow ();
73+ auto mainScreen = QGuiApplication::primaryScreen ();
74+
75+ const auto mainWindowGeometry = mainWindow ? mainWindow->geometry () : mainScreen->geometry ();
7376
7477 _modalTasksDialog.move (mainWindowGeometry.center () - _modalTasksDialog.rect ().center ());
7578 _modalTasksDialog.show ();
You can’t perform that action at this time.
0 commit comments