]> git.lyx.org Git - lyx.git/blobdiff - src/LyXFunc.cpp
tex2lyx/preamble.cpp: cosmetics
[lyx.git] / src / LyXFunc.cpp
index cd573f6022372885f1ee6d20535ef900d3fbdde4..88cd8c4a15bfc28000da8f803b1c41efc9a8d230 100644 (file)
@@ -453,6 +453,20 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
                        enable = false;
                break;
 
+       // FIXME optimally this should be in Text::getStatus. In such a case the flags
+       // are not passed when using context menu. This way it works.
+       case LFUN_SET_GRAPHICS_GROUP: {
+               if (!view())
+                       break;
+               InsetGraphics * ins = InsetGraphics::getCurrentGraphicsInset(view()->cursor());
+               if (!ins)
+                       break;
+               if (!cmd.argument().empty())
+                       flag.setOnOff(to_utf8(cmd.argument()) == ins->getParams().groupId);
+               enable = true;
+               break;
+       }
+
        case LFUN_TOOLBAR_TOGGLE:
        case LFUN_INSET_APPLY:
        case LFUN_BUFFER_WRITE: