Rework 'dbg painting' to be in line with trunk.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@20568 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-09-28 12:24:20 +00:00
parent 39cd77bee0
commit 3ab50efe1f
3 changed files with 13 additions and 7 deletions

View File

@ -350,9 +350,11 @@ int QLPainter::text(int x, int y, docstring const & s,
p.setLayoutDirection(Qt::LeftToRight); p.setLayoutDirection(Qt::LeftToRight);
p.drawText(-lb, mA, str); p.drawText(-lb, mA, str);
QPixmapCache::insert(key, pm); QPixmapCache::insert(key, pm);
/*
LYXERR(Debug::PAINTING) << "h=" << h << " mA=" << mA << " mD=" << mD LYXERR(Debug::PAINTING) << "h=" << h << " mA=" << mA << " mD=" << mD
<< " w=" << w << " lb=" << lb << " tw=" << textwidth << " w=" << w << " lb=" << lb << " tw=" << textwidth
<< " rb=" << rb << endl; << " rb=" << rb << endl;
*/
} }
// Draw the cached pixmap. // Draw the cached pixmap.
drawPixmap(x + lb, y - mA, pm); drawPixmap(x + lb, y - mA, pm);

View File

@ -198,7 +198,6 @@ void RowPainter::paintInset(pos_type const pos, Font const & font)
bool tmp = refreshInside; bool tmp = refreshInside;
if (!in || !in->wide()) { if (!in || !in->wide()) {
refreshInside = true; refreshInside = true;
LYXERR(Debug::PAINTING) << endl << "Paint inset fully" << endl;
} }
if (refreshInside) if (refreshInside)
inset->drawSelection(pi, int(x_), yo_); inset->drawSelection(pi, int(x_), yo_);
@ -1023,12 +1022,13 @@ void paintPar
// 12 lines lower): // 12 lines lower):
if (lyxerr.debugging(Debug::PAINTING)) { if (lyxerr.debugging(Debug::PAINTING)) {
if (text.isMainText(*pi.base.bv->buffer())) if (text.isMainText(*pi.base.bv->buffer()))
LYXERR(Debug::PAINTING) << "#"; LYXERR(Debug::PAINTING) << "\n{" << inside <<
repaintAll << row_has_changed << "}";
else else
LYXERR(Debug::PAINTING) << "[" << LYXERR(Debug::PAINTING) << "[" << inside <<
repaintAll << row_has_changed << repaintAll << row_has_changed << "]";
cursor_on_row << "]";
} }
rp.paintAppendix(); rp.paintAppendix();
rp.paintDepthBar(); rp.paintDepthBar();
rp.paintChangeBar(); rp.paintChangeBar();
@ -1044,8 +1044,6 @@ void paintPar
} }
// Re-enable screen drawing for future use of the painter. // Re-enable screen drawing for future use of the painter.
pi.pain.setDrawingEnabled(true); pi.pain.setDrawingEnabled(true);
LYXERR(Debug::PAINTING) << "." << endl;
} }
} // namespace anon } // namespace anon
@ -1054,6 +1052,7 @@ void paintPar
void paintText(BufferView & bv, void paintText(BufferView & bv,
Painter & pain) Painter & pain)
{ {
LYXERR(Debug::PAINTING) << "\t\t*** START DRAWING ***" << endl;
BOOST_ASSERT(bv.buffer()); BOOST_ASSERT(bv.buffer());
Buffer const & buffer = *bv.buffer(); Buffer const & buffer = *bv.buffer();
Text & text = buffer.text(); Text & text = buffer.text();
@ -1095,6 +1094,8 @@ void paintText(BufferView & bv,
// lyxerr << "par descent: " << text.getPar(vi.p1).ascent() << endl; // lyxerr << "par descent: " << text.getPar(vi.p1).ascent() << endl;
if (vi.y2 < bv.workHeight() && vi.update_strategy == FullScreenUpdate) if (vi.y2 < bv.workHeight() && vi.update_strategy == FullScreenUpdate)
pain.fillRectangle(0, vi.y2, bv.workWidth(), bv.workHeight() - vi.y2, Color::bottomarea); pain.fillRectangle(0, vi.y2, bv.workWidth(), bv.workHeight() - vi.y2, Color::bottomarea);
LYXERR(Debug::PAINTING) << "\n\t\t*** END DRAWING ***" << endl;
} }

View File

@ -83,6 +83,9 @@ What's new
buffer. These are bound by default to C-M-t and C-M-d, for Postscript buffer. These are bound by default to C-M-t and C-M-d, for Postscript
and DVI, respectively, for view, and to C-M-S-t and C-M-S-d, for update. and DVI, respectively, for view, and to C-M-S-t and C-M-S-d, for update.
- The debug output obtained with the '-dbg painting' option has been
modified to be more verbose and in line with the LyX development
version.
** Bug fixes: ** Bug fixes:
************* *************