From 3236678c7b2c0cea212cd9e5e9c0b2ee35700973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 4 May 2009 11:47:28 +0200 Subject: [PATCH] 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. --- src/plugins/texteditor/basetexteditor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 5b38fed36d9..669b5ab332e 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -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);