mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
move code to unify graphics groups from GuiGraphics to InsetGraphics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26540 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1db80d4df6
commit
6cd921678b
@ -716,12 +716,7 @@ void GuiGraphics::dispatchParams()
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -197,10 +197,17 @@ void InsetGraphics::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user