commit 678ab325c0a38b475a60a9045691789d115b2491
Author: Stephan Witt <sw...@lyx.org>
Date:   Sun Jan 9 22:33:43 2022 +0100

    #12423 fix a focus change problem
    
    The search widget triggers a showEvent() in updateTitle() leading to 
setting the focus to the default push button.
    The check in updateTitle() for the need to restore the title avoids 
superfluous show events and avoids the unwanted focus change.
---
 src/frontends/qt/GuiSearch.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiSearch.cpp b/src/frontends/qt/GuiSearch.cpp
index e387ce8..f12d42c 100644
--- a/src/frontends/qt/GuiSearch.cpp
+++ b/src/frontends/qt/GuiSearch.cpp
@@ -649,9 +649,10 @@ void GuiSearch::updateTitle()
                // remove title bar
                setTitleBarWidget(new QWidget());
                titleBarWidget()->hide();
-       } else
+       } else if (titleBarWidget()) {
                // restore title bar
                setTitleBarWidget(nullptr);
+       }
 }
 
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to