]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/GuiWorkArea.cpp
Do not use toobar menu as fallback context menu
[features.git] / src / frontends / qt4 / GuiWorkArea.cpp
index 5810e680a4f13eb2683cfa084b53a0ef8daa2faa..7b46eee74f9ea40fa93dd7dd8c135699a593af1d 100644 (file)
@@ -777,7 +777,7 @@ void GuiWorkArea::contextMenuEvent(QContextMenuEvent * e)
        }
 
        if (name.empty()) {
-               QAbstractScrollArea::contextMenuEvent(e);
+               e->accept();
                return;
        }
        // always show mnemonics when the keyboard is used to show the context menu
@@ -785,7 +785,7 @@ void GuiWorkArea::contextMenuEvent(QContextMenuEvent * e)
        bool const keyboard = (e->reason() == QContextMenuEvent::Keyboard);
        QMenu * menu = guiApp->menus().menu(toqstr(name), *d->lyx_view_, keyboard);
        if (!menu) {
-               QAbstractScrollArea::contextMenuEvent(e);
+               e->accept();
                return;
        }
        // Position the menu to the right.