diff options
author | jkobus <jaroslaw.kobus@digia.com> | 2013-04-24 12:42:29 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@digia.com> | 2013-04-24 15:31:32 +0200 |
commit | 895b89dbdf1a3ebc2965f5d8a66ac412d2b8f0cf (patch) | |
tree | 7b2578ba12e5d84f367637e46528fd08aae03502 /src/plugins/diffeditor/diffeditorwidget.cpp | |
parent | 482d43e3f6c2c73afce81642ae864f61090245d0 (diff) | |
download | qt-creator-895b89dbdf1a3ebc2965f5d8a66ac412d2b8f0cf.tar.gz |
Fix a crash on changing context lines with block selection
Crash occurs in diff editor when there is a block selection
and you are changing context lines number.
This workarounds the crash, but it seems that
when BaseTextEditorWidget has a blockSelection
calling "clear()" and "setPlainText()"
causes the crash. When I turn off the
blockSelection before calling "clear()" it helps.
Change-Id: I0133862a2d7e2914c16368b7efa9986b4d56ff39
Reviewed-by: David Schulz <david.schulz@digia.com>
Diffstat (limited to 'src/plugins/diffeditor/diffeditorwidget.cpp')
-rw-r--r-- | src/plugins/diffeditor/diffeditorwidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/diffeditor/diffeditorwidget.cpp b/src/plugins/diffeditor/diffeditorwidget.cpp index 346fc69c85..7dc7be70f9 100644 --- a/src/plugins/diffeditor/diffeditorwidget.cpp +++ b/src/plugins/diffeditor/diffeditorwidget.cpp @@ -718,6 +718,8 @@ void DiffEditorWidget::showDiff() const int leftHorizontalValue = m_leftEditor->horizontalScrollBar()->value(); const int rightHorizontalValue = m_rightEditor->horizontalScrollBar()->value(); + m_leftEditor->setBlockSelection(false); + m_rightEditor->setBlockSelection(false); m_leftEditor->clear(); m_rightEditor->clear(); m_leftEditor->clearLineNumbers(); |