diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 8391e270cf..cd15306aa2 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,7 @@ +2005-04-09 Martin Vermeer + + * math_colorinset.C (draw): fix crash and cursor positioning. + 2005-04-07 Martin Vermeer * math_nestinset.C (doDispatch): Fix arrow up/down inside diff --git a/src/mathed/math_colorinset.C b/src/mathed/math_colorinset.C index 10271c589f..e258707008 100644 --- a/src/mathed/math_colorinset.C +++ b/src/mathed/math_colorinset.C @@ -64,6 +64,7 @@ void MathColorInset::metrics(MetricsInfo & mi, Dimension & dim) const void MathColorInset::draw(PainterInfo & pi, int x, int y) const { + int const x0(x); if (editing(pi.base.bv)) { FontSetChanger dummy(pi.base, "textnormal"); drawMarkers(pi, x, y); @@ -79,7 +80,8 @@ void MathColorInset::draw(PainterInfo & pi, int x, int y) const pi.base.font.setColor(lcolor.getFromGUIName(asString(cell(0)))); cell(1).draw(pi, x, y); pi.base.font.setColor(origcol); - setPosCache(pi, x, y); + if (editing(pi.base.bv)) + setPosCache(pi, x0, y); }