GuiSearch: prevent Tab key to switch to work area (part of #12170)

QWidget::focusNextPrevChild() passes over to the parent (which is the
work area here) if the current window is not a dialog (isWindow()) or
a sub-window (window flag Qt::SubWindow).

We set the latter here to prevent this unwanted behavior.

Let's see if there are side-effects.
This commit is contained in:
Juergen Spitzmueller 2021-05-06 12:27:38 +02:00
parent fb8b484b7f
commit 9586c51c3f

View File

@ -126,6 +126,10 @@ GuiSearchWidget::GuiSearchWidget(QWidget * parent)
replacePB->setEnabled(false);
replacePrevPB->setEnabled(false);
replaceallPB->setEnabled(false);
// Make this a sub window to prevent focusNextPrevChild (Tab)
// switching to the parent (#12170)
setWindowFlags(Qt::SubWindow);
}