diff --git a/src/mathed/formula.C b/src/mathed/formula.C index 337924f15f..e1127d46a1 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -345,26 +345,12 @@ void InsetFormula::draw(BufferView * bv, LyXFont const & font, int h = par_->height(); int a = par_->ascent(); - bool done = false; -/* - if (LyXText * t = bv->getLyXText()) { - LyXText::Selection & sel = t->selection; - lyxerr << "sel.start: " << sel.start << "\n"; - lyxerr << "sel.end: " << sel.end << "\n"; - lyxerr << "t->cursor: " << t->cursor << "\n"; - if (sel.set() && sel.start < t->cursor && t->cursor < sel.end) { - pain.fillRectangle(x, y - a, w, h, LColor::selection); - done = true; - } - } -*/ - - if (!done) { + if (lcolor.getX11Name(LColor::mathbg)!=lcolor.getX11Name(LColor::background)) pain.fillRectangle(x, y - a, w, h, LColor::mathbg); - if (mathcursor && mathcursor->formula() == this) { - mathcursor->drawSelection(pain); - pain.rectangle(x, y - a, w, h, LColor::mathframe); - } + + if (mathcursor && mathcursor->formula() == this) { + mathcursor->drawSelection(pain); + pain.rectangle(x, y - a, w, h, LColor::mathframe); } par_->draw(pain, x, y); diff --git a/src/mathed/math_spaceinset.C b/src/mathed/math_spaceinset.C index e13b10daf3..d348218c2b 100644 --- a/src/mathed/math_spaceinset.C +++ b/src/mathed/math_spaceinset.C @@ -21,7 +21,7 @@ MathInset * MathSpaceInset::clone() const } -void MathSpaceInset::metrics(MathMetricsInfo const & mi) const +void MathSpaceInset::metrics(MathMetricsInfo const &) const { width_ = space_ ? space_ * 2 : 2; if (space_ > 3)