Fix crash and cursor positioning in math colour inset

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9797 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2005-04-09 11:13:21 +00:00
parent 71298cca7f
commit 75e4975063
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-04-09 Martin Vermeer <martin.vermeer@hut.fi>
* math_colorinset.C (draw): fix crash and cursor positioning.
2005-04-07 Martin Vermeer <martin.vermeer@hut.fi>
* math_nestinset.C (doDispatch): Fix arrow up/down inside

View File

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