]> git.lyx.org Git - lyx.git/commitdiff
make display of group list only depend on existence of groups; move the addition...
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 26 May 2008 09:33:08 +0000 (09:33 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 26 May 2008 09:33:08 +0000 (09:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24941 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ui/stdcontext.inc
src/frontends/qt4/Menus.cpp

index cf801ef70ad6d626c39b7e6e4d478dfcac635da4..ef6ddba4624ed81ae50457d4ca58ac1538b92e74 100644 (file)
@@ -300,6 +300,7 @@ Menuset
                Item "Settings...|S" "next-inset-toggle"
                Separator
                Item "Edit externally...|x" "inset-edit"
+               Separator
                GraphicsGroups
        End
 
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)));