{
InsetGraphicsParams tmp_params(params_);
string const lfun = InsetGraphics::params2string(tmp_params, buffer());
- buffer().undo().beginUndoGroup();
dispatch(FuncRequest(getLfun(), lfun));
- if (!params_.groupId.empty())
- dispatch(FuncRequest(LFUN_GRAPHICS_GROUPS_UNIFY,
- InsetGraphics::params2string(params_, buffer())));
- buffer().undo().endUndoGroup();
}
case LFUN_INSET_MODIFY: {
InsetGraphicsParams p;
string2params(to_utf8(cmd.argument()), buffer(), p);
- if (!p.filename.empty())
- setParams(p);
- else
+ if (p.filename.empty()) {
cur.noUpdate();
+ break;
+ }
+
+ setParams(p);
+ // if the inset is part of a graphics group, all the
+ // other members should be updated too.
+ if (!params_.groupId.empty())
+ graphics::unifyGraphicsGroups(cur.buffer(),
+ to_utf8(cmd.argument()));
break;
}