diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index ffc723f010..7ef1eaf6c5 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -433,20 +433,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const bool enable = true; switch (cmd.action) { - // 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_BUFFER_TOGGLE_READ_ONLY: flag.setOnOff(buf->isReadonly()); break; diff --git a/src/Text3.cpp b/src/Text3.cpp index 798336c678..583e1cd315 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -2182,6 +2182,15 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, enable = (cur.pos() > cur.paragraph().beginOfBody()); break; + case LFUN_SET_GRAPHICS_GROUP: { + InsetGraphics * ins = InsetGraphics::getCurrentGraphicsInset(cur); + if (!ins) + enable = false; + else + flag.setOnOff(to_utf8(cmd.argument()) == ins->getParams().groupId); + break; + } + case LFUN_WORD_DELETE_FORWARD: case LFUN_WORD_DELETE_BACKWARD: case LFUN_LINE_DELETE: