]> git.lyx.org Git - features.git/commitdiff
fix focus problem with minibuffer.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 27 May 2008 16:15:56 +0000 (16:15 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 27 May 2008 16:15:56 +0000 (16:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24964 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 620fd1989558f421565bfd3e0d6d44bb1c9ebaf1..852a4707afa80045d77606add600a3a369c1964f 100644 (file)
@@ -18,6 +18,7 @@
 #include "Dialog.h"
 #include "FileDialog.h"
 #include "GuiApplication.h"
+#include "GuiCommandBuffer.h"
 #include "GuiCompleter.h"
 #include "GuiWorkArea.h"
 #include "GuiKeySymbol.h"
@@ -1757,8 +1758,11 @@ bool GuiView::dispatch(FuncRequest const & cmd)
                        bool const show_it = cmd.argument() != "off";
                        // FIXME: this is a hack, "minibuffer" should not be
                        // hardcoded.
-                       if (GuiToolbar * t = toolbar("minibuffer"))
+                       if (GuiToolbar * t = toolbar("minibuffer")) {
                                t->setVisible(show_it);
+                               LASSERT(t->commandBuffer(), break);
+                               t->commandBuffer()->setFocus();
+                       }
                        break;
                }
                case LFUN_DROP_LAYOUTS_CHOICE: