Commit e2dab768 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Core: Improve dialogParent() to work better with detached windows

Make new windows center on the window the user is currently looking
at instead of the mainwindow.

Change-Id: Ia6246a4f1935b6d2d66db329c6141f4cb8349916
Reviewed-by: default avatarEike Ziller <>
parent 86b50d83
......@@ -488,7 +488,11 @@ QWidget *ICore::mainWindow()
QWidget *ICore::dialogParent()
QWidget *active = QApplication::activeModalWidget();
return active ? active : m_mainwindow;
if (!active)
active = QApplication::activeWindow();
if (!active)
active = m_mainwindow;
return active;
QStatusBar *ICore::statusBar()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment