From 596a2ca159d9135c686356b05043e1c8fbbfbff5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 13 Aug 2004 22:39:39 +0000 Subject: [PATCH] use setPosCache where appropriate git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8916 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_data.C | 14 +++++--------- src/mathed/math_nestinset.C | 1 - src/mathed/math_unknowninset.C | 3 +-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/mathed/math_data.C b/src/mathed/math_data.C index e342291375..8a97e3e53a 100644 --- a/src/mathed/math_data.C +++ b/src/mathed/math_data.C @@ -276,9 +276,8 @@ void MathArray::metrics(MetricsInfo & mi) const void MathArray::draw(PainterInfo & pi, int x, int y) const { //lyxerr << "MathArray::draw: x: " << x << " y: " << y << endl; - - xo_ = x; - yo_ = y; + xo_ = x; + yo_ = y; if (empty()) { pi.pain.rectangle(x, y - ascent(), width(), height(), LColor::mathline); @@ -332,16 +331,13 @@ void MathArray::metricsT(TextMetricsInfo const & mi, Dimension & dim) const void MathArray::drawT(TextPainter & pain, int x, int y) const { - //if (drawn_ && x == xo_ && y == yo_) - // return; //lyxerr << "x: " << x << " y: " << y << ' ' << pain.workAreaHeight() << endl; - xo_ = x; - yo_ = y; - drawn_ = true; + xo_ = x; + yo_ = y; for (const_iterator it = begin(), et = end(); it != et; ++it) { (*it)->drawT(pain, x, y); - //x += (*it->width_; + //x += (*it)->width_; x += 2; } } diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index 591678b762..3306b06384 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -907,7 +907,6 @@ void MathNestInset::lfunMousePress(LCursor & cur, FuncRequest & cmd) if (cmd.button() == mouse_button::button1) { first_x = cmd.x; first_y = cmd.y; - //cur.setScreenPos(cmd.x + xo_, cmd.y + yo_); lyxerr << "lfunMousePress: setting cursor to: " << cur << endl; cur.resetAnchor(); cur.bv().cursor() = cur; diff --git a/src/mathed/math_unknowninset.C b/src/mathed/math_unknowninset.C index c304b4b9e2..496b274c05 100644 --- a/src/mathed/math_unknowninset.C +++ b/src/mathed/math_unknowninset.C @@ -62,8 +62,7 @@ void MathUnknownInset::draw(PainterInfo & pi, int x, int y) const drawStrBlack(pi, x, y, name_); else drawStrRed(pi, x, y, name_); - xo_ = x; - yo_ = y; + setPosCache(pi, x, y); } -- 2.39.2