forked from qt-creator/qt-creator
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:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user