Skip to content

Commit 664d02e

Browse files
authored
Raise dialogs only if they are modal (#808)
1 parent 72e5c56 commit 664d02e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/DockManager.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,11 +545,14 @@ CDockManager::CDockManager(QWidget *parent) :
545545
}
546546

547547
// If the user clicks the main window or drags a floating widget or works with a
548-
// dialog, then raise the main window, all floating widgets and the focus window
549-
// itself to bring it into foregreound of any other application
548+
// modal dialog, then raise the main window, all floating widgets and the focus window
549+
// itself to bring it into foreground of any other application.
550550
bool raise = qobject_cast<QMainWindow*>(widget)
551-
|| qobject_cast<QDialog*>(widget)
552551
|| qobject_cast<ads::CFloatingDockContainer*>(widget);
552+
if (auto dialog = qobject_cast<QDialog*>(widget))
553+
{
554+
raise |= dialog->isModal();
555+
}
553556
if (!raise)
554557
{
555558
return;

0 commit comments

Comments
 (0)