Commit e2dab768 authored by Tobias Hunger's avatar Tobias Hunger

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 <eike.ziller@theqtcompany.com>
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()
......
Markdown is supported
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