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:
Richard Heck 2008-03-23 14:26:13 +00:00
parent d8ab0622c5
commit ec5ac0486a
2 changed files with 5 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}