Fix text highlighting on Mac.

Broke with 8c9a97479a

Reviewed-by: Thorbjørn Lindeijer
This commit is contained in:
con
2010-05-19 10:36:05 +02:00
parent b7b50edad5
commit 04840b0ea7

View File

@@ -2467,8 +2467,7 @@ void BaseTextEditor::paintEvent(QPaintEvent *e)
const int selStart = range.cursor.selectionStart() - blpos;
const int selEnd = range.cursor.selectionEnd() - blpos;
if (selStart <= bllen && selEnd >= 0
&& selEnd >= selStart
&& !range.format.hasProperty(QTextFormat::FullWidthSelection)) {
&& selEnd >= selStart) {
QTextLayout::FormatRange o;
o.start = selStart;
o.length = selEnd - selStart;