diff options
author | Serhii Moroz <frost.asm@gmail.com> | 2017-08-18 23:20:21 +0300 |
---|---|---|
committer | Serhii Moroz <frost.asm@gmail.com> | 2017-10-02 08:30:11 +0000 |
commit | 6afdb8bdf957909d086684ada10cf86f132c3efe (patch) | |
tree | de76da46b13a08ca9848d18d003c99bb72f670ae | |
parent | 7d88284e486a528c7e5a825a05f63349e74e40db (diff) |
TextEditor: Disable block selection if file was changed in other editorv4.4.1
Task-number: QTCREATORBUG-18770
Change-Id: Iccdc3deb354599bf1fd6f1cb8c0d5a1765ecb471
Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r-- | src/plugins/texteditor/texteditor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index f237c0f7ed..40971354f4 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -1253,6 +1253,11 @@ void TextEditorWidgetPrivate::editorContentsChange(int position, int charsRemove // lines were inserted or removed from outside, keep viewport on same part of text if (q->firstVisibleBlock().blockNumber() > posBlock.blockNumber()) q->verticalScrollBar()->setValue(q->verticalScrollBar()->value() + newBlockCount - m_blockCount); + + if (m_inBlockSelectionMode) { + disableBlockSelection(CursorUpdateClearSelection); + q->viewport()->update(); + } } m_blockCount = newBlockCount; m_scrollBarUpdateTimer.start(500); |