forked from qt-creator/qt-creator
TextEditor: allow highlightings in selections
If the selection foregound color is undefined do not overwrite the already applied highlighting. Fixes: QTCREATORBUG-24656 Change-Id: Ia125e8e6b9efba73d5a13facc2446a793d59f5c3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -4724,7 +4724,6 @@ void TextEditorWidgetPrivate::setupSelections(const PaintEventData &data,
|
||||
const QTextCharFormat selectionFormat = data.fontSettings.toTextCharFormat(C_SELECTION);
|
||||
if (selectionFormat.background().style() != Qt::NoBrush)
|
||||
o.format.setBackground(selectionFormat.background());
|
||||
if (selectionFormat.foreground().style() != Qt::NoBrush)
|
||||
o.format.setForeground(selectionFormat.foreground());
|
||||
}
|
||||
if ((data.textCursor.hasSelection() && i == data.context.selections.size() - 1)
|
||||
|
Reference in New Issue
Block a user