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>
This commit is contained in:
jkobus
2013-04-24 12:42:29 +02:00
committed by Jarek Kobus
parent 482d43e3f6
commit 895b89dbdf

View File

@@ -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();