From: Jean-Marc Lasgouttes Date: Wed, 11 Oct 2017 15:39:02 +0000 (+0200) Subject: Some improvements related to Debug::PAINTING X-Git-Tag: lyx-2.4.0dev-acb2ca7b~4489 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e7122d79268104419f96b30e11d1a1817a2d6a77;p=features.git Some improvements related to Debug::PAINTING Avoid blinking the cursor when these debug messages are active. This avoids a lot of debug information. --- diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 21d34bc7c5..c4ed9ca4af 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -1928,10 +1928,10 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type const pit, int const // Instrumentation for testing row cache (see also // 12 lines lower): if (lyxerr.debugging(Debug::PAINTING) - && (row.selection() || pi.full_repaint || row_has_changed)) { - string const foreword = text_->isMainText() ? - "main text redraw " : "inset text redraw: "; - LYXERR(Debug::PAINTING, foreword << "pit=" << pit << " row=" << i + && (row.selection() || pi.full_repaint || row_has_changed)) { + string const foreword = text_->isMainText() ? "main text redraw " + : "inset text redraw: "; + LYXERR0(foreword << "pit=" << pit << " row=" << i << " row_selection=" << row.selection() << " full_repaint=" << pi.full_repaint << " row_has_changed=" << row_has_changed diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index a24e8da711..264933b082 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -431,12 +431,15 @@ void GuiWorkArea::startBlinkingCaret() d->showCaret(); - //we're not supposed to cache this value. - int const time = QApplication::cursorFlashTime() / 2; - if (time <= 0) - return; - d->caret_timeout_.setInterval(time); - d->caret_timeout_.start(); + // Avoid blinking when debugging PAINTING, since it creates too much noise + if (!lyxerr.debugging(Debug::PAINTING)) { + // we are not supposed to cache this value. + int const time = QApplication::cursorFlashTime() / 2; + if (time <= 0) + return; + d->caret_timeout_.setInterval(time); + d->caret_timeout_.start(); + } }