Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateviewhelpers.cpp
Context not available. | |||||
483 | // The text currently selected in the document, to be drawn later. | 483 | // The text currently selected in the document, to be drawn later. | ||
---|---|---|---|---|---|
484 | const KTextEditor::Range &selection = m_view->selectionRange(); | 484 | const KTextEditor::Range &selection = m_view->selectionRange(); | ||
485 | 485 | | |||
486 | // init pen once, afterwards, only change it if color changes to avoid a lot of allocation for setPen | | |||
487 | QPainter painter; | 486 | QPainter painter; | ||
488 | painter.setPen(selectionBgColor); | | |||
489 | if (painter.begin(&m_pixmap)) { | 487 | if (painter.begin(&m_pixmap)) { | ||
488 | // init pen once, afterwards, only change it if color changes to avoid a lot of allocation for setPen | ||||
489 | painter.setPen(selectionBgColor); | ||||
490 | | ||||
490 | // Do not force updates of the highlighting if the document is very large | 491 | // Do not force updates of the highlighting if the document is very large | ||
491 | bool simpleMode = m_doc->lines() > 7500; | 492 | bool simpleMode = m_doc->lines() > 7500; | ||
492 | 493 | | |||
Context not available. | |||||
592 | } | 593 | } | ||
593 | } | 594 | } | ||
594 | } | 595 | } | ||
596 | | ||||
597 | // end painting | ||||
598 | painter.end(); | ||||
595 | } | 599 | } | ||
596 | 600 | | |||
597 | // set right ratio | 601 | // set right ratio | ||
Context not available. |