]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/Menus.cpp
make display of group list only depend on existence of groups; move the addition...
[features.git] / src / frontends / qt4 / Menus.cpp
index c8ee95464d6c2645394a144923fe6e4dce2c7810..505167b8054a0bf358bc9ddacce14e3b6c400604 100644 (file)
@@ -639,21 +639,15 @@ void MenuDefinition::expandGraphicsGroups(BufferView const * bv)
 {
        if (!bv)
                return;
-       Cursor const & cur = bv->cursor();
-       Buffer const & buf = bv->buffer();
        set<string> grp;
-       InsetGraphics::getGraphicsGroups(buf, grp);
-       set<string>::const_iterator it = grp.begin();
-       set<string>::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<string>::const_iterator it = grp.begin();
+       set<string>::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)));