mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Revert 23899 and introduce the correct fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23904 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d8ab0622c5
commit
ec5ac0486a
@ -1449,7 +1449,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
|
||||
case LFUN_GRAPHICS_EDIT: {
|
||||
FuncRequest fr(action, argument);
|
||||
InsetGraphics().dispatch(view()->cursor(), fr);
|
||||
InsetGraphics ig;
|
||||
ig.setBuffer(*lyx_view_->buffer());
|
||||
ig.dispatch(view()->cursor(), fr);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -175,12 +175,9 @@ void InsetGraphics::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
switch (cmd.action) {
|
||||
case LFUN_GRAPHICS_EDIT: {
|
||||
// use buffer() from cursor because this inset may not
|
||||
// have an initialized buffer_.
|
||||
Buffer const & buf = cur.bv().buffer();
|
||||
InsetGraphicsParams p;
|
||||
InsetGraphicsMailer::string2params(to_utf8(cmd.argument()), buf, p);
|
||||
editGraphics(p, buf);
|
||||
InsetGraphicsMailer::string2params(to_utf8(cmd.argument()), buffer(), p);
|
||||
editGraphics(p, buffer());
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user