mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Some improvements related to Debug::PAINTING
Avoid blinking the cursor when these debug messages are active. This avoids a lot of debug information.
This commit is contained in:
parent
6956cea323
commit
e7122d7926
@ -1928,10 +1928,10 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type const pit, int const
|
|||||||
// Instrumentation for testing row cache (see also
|
// Instrumentation for testing row cache (see also
|
||||||
// 12 lines lower):
|
// 12 lines lower):
|
||||||
if (lyxerr.debugging(Debug::PAINTING)
|
if (lyxerr.debugging(Debug::PAINTING)
|
||||||
&& (row.selection() || pi.full_repaint || row_has_changed)) {
|
&& (row.selection() || pi.full_repaint || row_has_changed)) {
|
||||||
string const foreword = text_->isMainText() ?
|
string const foreword = text_->isMainText() ? "main text redraw "
|
||||||
"main text redraw " : "inset text redraw: ";
|
: "inset text redraw: ";
|
||||||
LYXERR(Debug::PAINTING, foreword << "pit=" << pit << " row=" << i
|
LYXERR0(foreword << "pit=" << pit << " row=" << i
|
||||||
<< " row_selection=" << row.selection()
|
<< " row_selection=" << row.selection()
|
||||||
<< " full_repaint=" << pi.full_repaint
|
<< " full_repaint=" << pi.full_repaint
|
||||||
<< " row_has_changed=" << row_has_changed
|
<< " row_has_changed=" << row_has_changed
|
||||||
|
@ -431,12 +431,15 @@ void GuiWorkArea::startBlinkingCaret()
|
|||||||
|
|
||||||
d->showCaret();
|
d->showCaret();
|
||||||
|
|
||||||
//we're not supposed to cache this value.
|
// Avoid blinking when debugging PAINTING, since it creates too much noise
|
||||||
int const time = QApplication::cursorFlashTime() / 2;
|
if (!lyxerr.debugging(Debug::PAINTING)) {
|
||||||
if (time <= 0)
|
// we are not supposed to cache this value.
|
||||||
return;
|
int const time = QApplication::cursorFlashTime() / 2;
|
||||||
d->caret_timeout_.setInterval(time);
|
if (time <= 0)
|
||||||
d->caret_timeout_.start();
|
return;
|
||||||
|
d->caret_timeout_.setInterval(time);
|
||||||
|
d->caret_timeout_.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user