forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user