Fixed resetting of block highlighting when leaving the extra area

When the block highlighting was enabled, it would still get removed when
the mouse left the extra area. Now it changes back to the text cursor
position.

Done with mae.
This commit is contained in:
Thorbjørn Lindeijer
2009-05-04 11:47:28 +02:00
parent 0c0cacb71e
commit 3236678c7b

View File

@@ -2722,7 +2722,12 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e)
|| !TextBlockUserData::hasClosingCollapse(cursor.block().next()))
d->extraAreaHighlightCollapseColumn = cursor.block().next().length()-1;
}
} else if (d->m_displaySettings.m_highlightBlocks) {
QTextCursor cursor = textCursor();
d->extraAreaHighlightCollapseBlockNumber = cursor.blockNumber();
d->extraAreaHighlightCollapseColumn = cursor.position() - cursor.block().position();
}
if (highlightBlockNumber != d->extraAreaHighlightCollapseBlockNumber
|| highlightColumn != d->extraAreaHighlightCollapseColumn)
d->m_highlightBlocksTimer->start(d->m_highlightBlocksInfo.isEmpty() ? 40 : 10);