[LyX/master] GuiSearch: prevent Tab key to switch to work area (part of #12170)
Juergen Spitzmueller
spitz at lyx.org
Thu May 6 10:21:42 UTC 2021
commit 9586c51c3fe2bfa2f5cb045266b9d23d42b9c7b5
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Thu May 6 12:27:38 2021 +0200
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.
---
src/frontends/qt/GuiSearch.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/frontends/qt/GuiSearch.cpp b/src/frontends/qt/GuiSearch.cpp
index 32a8fd1..9212ddd 100644
--- a/src/frontends/qt/GuiSearch.cpp
+++ b/src/frontends/qt/GuiSearch.cpp
@@ -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);
}
More information about the lyx-cvs
mailing list