X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flyxfunc.C;h=bf551cd8b55ba52548abb52d28b459770eb39c6b;hb=c1e009f2d3baa65a05345224ae14f1fe521b8199;hp=b1a737955eaa2cac3aad98bb2f8b0d3902fbee7e;hpb=91b3be6f57305be7a2b83d8e1e8774c3e2581752;p=lyx.git diff --git a/src/lyxfunc.C b/src/lyxfunc.C index b1a737955e..bf551cd8b5 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -44,6 +44,7 @@ #include "ParagraphParameters.h" #include "insets/insetcommand.h" +#include "insets/insetexternal.h" #include "insets/insettabular.h" #include "mathed/formulamacro.h" @@ -501,7 +502,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const // jump back to owner if an InsetText, so // we get back to the InsetTabular or whatever if (inset->lyxCode() == Inset::TEXT_CODE) - inset = static_cast(inset->owner()); + inset = inset->owner(); Inset::Code code = inset->lyxCode(); switch (code) { @@ -1056,14 +1057,14 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose) string const str = bformat(_("Saving document %1$s..."), MakeDisplayPath(owner->buffer()->fileName())); owner->message(str); - MenuWrite(view(), owner->buffer()); + MenuWrite(owner->buffer()); owner->message(str + _(" done.")); } else - WriteAs(view(), owner->buffer()); + WriteAs(owner->buffer()); break; case LFUN_WRITEAS: - WriteAs(view(), owner->buffer(), argument); + WriteAs(owner->buffer(), argument); break; case LFUN_MENURELOAD: { @@ -1362,18 +1363,18 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose) << id << ']' << endl; break; } else { - lyxerr[Debug::INFO] << "Paragraph " << (*par)->id() + lyxerr[Debug::INFO] << "Paragraph " << par->id() << " found." << endl; } if (view()->theLockingInset()) view()->unlockInset(view()->theLockingInset()); - if ((*par)->inInset()) { + if (par->inInset()) { FuncRequest cmd(view(), LFUN_INSET_EDIT, "left"); - (*par)->inInset()->localDispatch(cmd); + par->inInset()->localDispatch(cmd); } // Set the cursor - view()->getLyXText()->setCursor(*par, 0); + view()->getLyXText()->setCursor(par.pit(), 0); view()->switchKeyMap(); owner->view_state_changed(); @@ -1588,6 +1589,12 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose) owner->getDialogs().toggleTooltips(); break; + case LFUN_EXTERNAL_EDIT: { + InsetExternal() + .localDispatch(FuncRequest(view(), action, argument)); + break; + } + default: // Then if it was none of the above // Trying the BufferView::pimpl dispatch: