Improve painting debug info.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19970 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-09-01 09:33:57 +00:00
parent aef5a7b9f7
commit 4ed011dbd1
2 changed files with 4 additions and 2 deletions

View File

@ -1554,12 +1554,14 @@ void BufferView::draw(frontend::Painter & pain)
int yy = metrics_info_.y1; int yy = metrics_info_.y1;
// draw contents // draw contents
LYXERR(Debug::PAINTING) << "\t\t*** START DRAWING ***" << endl;
for (pit_type pit = metrics_info_.p1; pit <= metrics_info_.p2; ++pit) { for (pit_type pit = metrics_info_.p1; pit <= metrics_info_.p2; ++pit) {
ParagraphMetrics const & pm = tm.parMetrics(pit); ParagraphMetrics const & pm = tm.parMetrics(pit);
yy += pm.ascent(); yy += pm.ascent();
tm.drawParagraph(pi, pit, 0, yy); tm.drawParagraph(pi, pit, 0, yy);
yy += pm.descent(); yy += pm.descent();
} }
LYXERR(Debug::PAINTING) << "\n\t\t*** END DRAWING ***" << endl;
// and grey out above (should not happen later) // and grey out above (should not happen later)
// lyxerr << "par ascent: " << text.getPar(metrics_info_.p1).ascent() << endl; // lyxerr << "par ascent: " << text.getPar(metrics_info_.p1).ascent() << endl;

View File

@ -1037,8 +1037,8 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) co
// 12 lines lower): // 12 lines lower):
if (lyxerr.debugging(Debug::PAINTING)) { if (lyxerr.debugging(Debug::PAINTING)) {
if (text_->isMainText(bv_->buffer())) if (text_->isMainText(bv_->buffer()))
LYXERR(Debug::PAINTING) << "\n{" << LYXERR(Debug::PAINTING) << "{" <<
pi.full_repaint << row_has_changed << "} "; pi.full_repaint << row_has_changed << "}\n";
else else
LYXERR(Debug::PAINTING) << "[" << LYXERR(Debug::PAINTING) << "[" <<
pi.full_repaint << row_has_changed << "]"; pi.full_repaint << row_has_changed << "]";