use setPosCache where appropriate

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8916 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2004-08-13 22:39:39 +00:00
parent b119fd180d
commit 596a2ca159
3 changed files with 6 additions and 12 deletions

View File

@ -276,7 +276,6 @@ 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;
@ -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;
for (const_iterator it = begin(), et = end(); it != et; ++it) {
(*it)->drawT(pain, x, y);
//x += (*it->width_;
//x += (*it)->width_;
x += 2;
}
}

View File

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

View File

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