]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiView.cpp
Allow use of Tab keys when no document's open.
[lyx.git] / src / frontends / qt4 / GuiView.cpp
index 3db21f679596d91441ae11ce1dc2370727ac4cdb..c07aa04ec0aedc20424c0bd294ad51f41dbb3bdd 100644 (file)
@@ -54,6 +54,7 @@
 #include "support/FileFilterList.h"
 #include "support/FileName.h"
 #include "support/filetools.h"
+#include "support/ForkedCalls.h"
 #include "support/lstrings.h"
 #include "support/os.h"
 #include "support/Package.h"
@@ -459,6 +460,9 @@ void GuiView::dropEvent(QDropEvent* event)
 
 void GuiView::message(docstring const & str)
 {
+       if (ForkedProcess::iAmAChild())
+               return;
+
        statusBar()->showMessage(toqstr(str));
        d.statusbar_timer_.stop();
        d.statusbar_timer_.start(3000);
@@ -580,9 +584,16 @@ bool GuiView::event(QEvent * e)
                        // Nothing special to do.
                        return QMainWindow::event(e);
 
+               QKeyEvent * ke = static_cast<QKeyEvent*>(e);
+
+               // Let Qt handle menu access and the Tab keys to navigate keys to navigate
+               // between controls.
+               if (ke->modifiers() & Qt::AltModifier || ke->key() == Qt::Key_Tab 
+                       || ke->key() == Qt::Key_Backtab)
+                       return QMainWindow::event(e);
+
                // Allow processing of shortcuts that are allowed even when no Buffer
                // is viewed.
-               QKeyEvent * ke = static_cast<QKeyEvent*>(e);
                theLyXFunc().setLyXView(this);
                KeySymbol sym;
                setKeySymbol(&sym, ke);