diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 8d8ca5916a..bb54b0aa5c 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -3361,8 +3361,7 @@ bool GuiView::goToFileRow(string const & argument) void GuiView::toolBarPopup(const QPoint & /*pos*/) { - QMenu * menu = new QMenu; - menu = guiApp->menus().menu(toqstr("context-toolbars"), * this); + QMenu * menu = guiApp->menus().menu(toqstr("context-toolbars"), * this); menu->exec(QCursor::pos()); } diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 6bf68cd09a..bfedecc182 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -784,7 +784,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 @@ -792,7 +792,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. diff --git a/status.22x b/status.22x index 72e014bef1..6a06b68d03 100644 --- a/status.22x +++ b/status.22x @@ -100,6 +100,8 @@ What's new - Don't swallow labels not entered through the toolbar in mathed (bug 10546). +- Fix bad context menu on insets that do not have one (bug 10626). + * INTERNALS