diff --git a/src/DockManager.cpp b/src/DockManager.cpp index 9159866..bc1326b 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -545,11 +545,14 @@ CDockManager::CDockManager(QWidget *parent) : } // If the user clicks the main window or drags a floating widget or works with a - // dialog, then raise the main window, all floating widgets and the focus window - // itself to bring it into foregreound of any other application + // modal dialog, then raise the main window, all floating widgets and the focus window + // itself to bring it into foreground of any other application. bool raise = qobject_cast(widget) - || qobject_cast(widget) || qobject_cast(widget); + if (auto dialog = qobject_cast(widget)) + { + raise |= dialog->isModal(); + } if (!raise) { return;