diff --git a/src/mathed/InsetMathMacro.C b/src/mathed/InsetMathMacro.C index 5126e19ccc..43cbed7c31 100644 --- a/src/mathed/InsetMathMacro.C +++ b/src/mathed/InsetMathMacro.C @@ -105,8 +105,8 @@ void MathMacro::draw(PainterInfo & pi, int x, int y) const tmpl_.draw(pi, x + w + 12, h); h += tmpl_.descent(); Dimension ldim; - string t = "#1: "; - mathed_string_dim(font, name(), ldim); + docstring t = from_ascii("#1: "); + mathed_string_dim(font, t, ldim); for (idx_type i = 0; i < nargs(); ++i) { MathArray const & c = cell(i); h += max(c.ascent(), ldim.asc) + 5; @@ -156,6 +156,27 @@ InsetBase * MathMacro::editXY(LCursor & cur, int x, int y) } +bool MathMacro::idxFirst(LCursor & cur) const +{ + cur.updateFlags(Update::Force); + return InsetMathNest::idxFirst(cur); +} + + +bool MathMacro::idxLast(LCursor & cur) const +{ + cur.updateFlags(Update::Force); + return InsetMathNest::idxLast(cur); +} + + +bool MathMacro::notifyCursorLeaves(LCursor & cur) +{ + cur.updateFlags(Update::Force); + return InsetMathNest::notifyCursorLeaves(cur); +} + + void MathMacro::maple(MapleStream & os) const { updateExpansion(); diff --git a/src/mathed/InsetMathMacro.h b/src/mathed/InsetMathMacro.h index 478f08066c..cc2be0a014 100644 --- a/src/mathed/InsetMathMacro.h +++ b/src/mathed/InsetMathMacro.h @@ -43,6 +43,12 @@ public: bool boundary, int & x, int & y) const; /// InsetBase * editXY(LCursor & cur, int x, int y); + /// target pos when we enter the inset from the left by pressing "Right" + bool idxFirst(LCursor &) const; + /// target pos when we enter the inset from the right by pressing "Left" + bool idxLast(LCursor &) const; + /// + virtual bool notifyCursorLeaves(LCursor &); /// docstring name() const; ///