X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetPhantom.cpp;h=9e3808f0e7ca38d1d9bc4f333fc5411ac3360145;hb=bfddee97e191a853f0576f4fab3f095c4e9ce0de;hp=f275e1c9c7711b40d80e914f5958b7b037df25b7;hpb=574931dcdb04f0b3be09dc7a2305611c5e88ed78;p=lyx.git diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp index f275e1c9c7..9e3808f0e7 100644 --- a/src/insets/InsetPhantom.cpp +++ b/src/insets/InsetPhantom.cpp @@ -126,7 +126,7 @@ InsetPhantom::~InsetPhantom() } -docstring InsetPhantom::name() const +docstring InsetPhantom::layoutName() const { return from_ascii("Phantom:" + phantomtranslator().find(params_.type)); } @@ -154,7 +154,7 @@ void InsetPhantom::draw(PainterInfo & pi, int x, int y) const ColorCode const origcol = pi.base.font.color(); pi.base.font.setColor(Color_special); pi.base.font.setColor(origcol); - Dimension const dim = dimension(*pi.base.bv); + Dimension const dim = Inset::dimension(*pi.base.bv); if (params_.type == InsetPhantomParams::Phantom || params_.type == InsetPhantomParams::VPhantom) { @@ -261,6 +261,8 @@ void InsetPhantom::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_INSET_MODIFY: cur.recordUndoInset(ATOMIC_UNDO, this); string2params(to_utf8(cmd.argument()), params_); + setButtonLabel(); + cur.forceBufferUpdate(); break; case LFUN_INSET_DIALOG_UPDATE: @@ -305,7 +307,7 @@ docstring InsetPhantom::toolTip(BufferView const &, int, int) const } -int InsetPhantom::latex(odocstream & os, OutputParams const & runparams) const +void InsetPhantom::latex(otexstream & os, OutputParams const & runparams) const { if (params_.type == InsetPhantomParams::Phantom) os << "\\phantom{"; @@ -313,10 +315,8 @@ int InsetPhantom::latex(odocstream & os, OutputParams const & runparams) const os << "\\hphantom{"; else if (params_.type == InsetPhantomParams::VPhantom) os << "\\vphantom{"; - int const i = InsetCollapsable::latex(os, runparams); + InsetCollapsable::latex(os, runparams); os << "}"; - - return i; } @@ -358,7 +358,7 @@ docstring InsetPhantom::xhtml(XHTMLStream &, OutputParams const &) const return docstring(); } -docstring InsetPhantom::contextMenu(BufferView const &, int, int) const +docstring InsetPhantom::contextMenuName() const { return from_ascii("context-phantom"); }