refactor rename selections

the new approach makes it possible to use more edit features
inside the rename selection like cut/copy/paste. Furthermore
it compresses rename operations better on the undo stack.
This commit is contained in:
mae
2009-12-03 18:35:36 +01:00
parent 48a555d789
commit 480c9a5bf4
5 changed files with 129 additions and 55 deletions

View File

@@ -4349,7 +4349,10 @@ void BaseTextEditor::setExtraSelections(ExtraSelectionKind kind, const QList<QTe
if (kind == CodeSemanticsSelection) {
d->m_overlay->clear();
foreach (const QTextEdit::ExtraSelection &selection, d->m_extraSelections[kind]) {
d->m_overlay->addOverlaySelection(selection.cursor, selection.format.background().color(), true);
d->m_overlay->addOverlaySelection(selection.cursor,
selection.format.background().color(),
selection.format.background().color(),
true);
}
d->m_overlay->setVisible(!d->m_overlay->isEmpty());