+ case LFUN_SET_GRAPHICS_GROUP: {
+ Inset * instmp = &cur.inset();
+ if (instmp->lyxCode() != GRAPHICS_CODE) instmp = cur.nextInset();
+ if (!instmp || instmp->lyxCode() != GRAPHICS_CODE) break;
+
+ cur.recordUndoFullDocument();
+ Inset & inset = *instmp;
+ InsetGraphics & ins = static_cast<InsetGraphics &>(inset);
+
+ string id = to_utf8(cmd.argument());
+ string grp = InsetGraphics::getGroupParams(bv->buffer(), id);
+ InsetGraphicsParams tmp, inspar = ins.getParams();
+
+ if (id.empty())
+ inspar.groupId = to_utf8(cmd.argument());
+ else {
+ InsetGraphics::string2params(grp, bv->buffer(), tmp);
+ tmp.filename = inspar.filename;
+ inspar = tmp;
+ }
+
+ ins.setParams(inspar);
+ }
+