fix 'math background wrong in selected text' problem

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3051 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-11-20 15:20:03 +00:00
parent 26685ea29b
commit c84131951f
2 changed files with 6 additions and 20 deletions

View File

@ -345,27 +345,13 @@ 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);
}
}
par_->draw(pain, x, y);
xx += par_->width();

View File

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