diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index cf801ef70a..ef6ddba462 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -300,6 +300,7 @@ Menuset Item "Settings...|S" "next-inset-toggle" Separator Item "Edit externally...|x" "inset-edit" + Separator GraphicsGroups End diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index c8ee95464d..505167b805 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -639,21 +639,15 @@ void MenuDefinition::expandGraphicsGroups(BufferView const * bv) { if (!bv) return; - Cursor const & cur = bv->cursor(); - Buffer const & buf = bv->buffer(); set grp; - InsetGraphics::getGraphicsGroups(buf, grp); - set::const_iterator it = grp.begin(); - set::const_iterator end = grp.end(); + InsetGraphics::getGraphicsGroups(bv->buffer(), grp); if (grp.empty()) return; - InsetGraphics * ins = InsetGraphics::getCurrentGraphicsInset(cur); - if (!ins) - return; - add(MenuItem(MenuItem::Separator)); - if (!ins->getParams().groupId.empty()) - add(MenuItem(MenuItem::Command, qt_("Clear group"), FuncRequest(LFUN_SET_GRAPHICS_GROUP))); + set::const_iterator it = grp.begin(); + set::const_iterator end = grp.end(); + add(MenuItem(MenuItem::Command, qt_("No Group"), + FuncRequest(LFUN_SET_GRAPHICS_GROUP))); for (; it != end; it++) { addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(*it), FuncRequest(LFUN_SET_GRAPHICS_GROUP, *it)));