Fixed overlay selections

1. allow empty overlay selections
2. make it possible to bind a selection to a specified length
This commit is contained in:
mae
2009-11-30 13:56:54 +01:00
parent 99c9c3c3c0
commit 28e3ba5bfb
3 changed files with 17 additions and 9 deletions

View File

@@ -4219,7 +4219,7 @@ 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());
d->m_overlay->addOverlaySelection(selection.cursor, selection.format.background().color(), true);
}
d->m_overlay->setVisible(!d->m_overlay->isEmpty());