Ignore index change when we set the document

Do the same as in case of sidebyside editor.

Task-number: QTCREATORBUG-18306
Change-Id: I1364aed0edb02dd9f5432e191ce4fb4b2db34430
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2018-05-04 09:40:18 +02:00
parent 416e4dc1ad
commit 1a23768563

View File

@@ -284,9 +284,12 @@ void UnifiedDiffEditorWidget::setDiff(const QList<FileData> &diffFileList,
{
Q_UNUSED(workingDirectory)
const bool oldIgnore = m_controller.m_ignoreCurrentIndexChange;
m_controller.m_ignoreCurrentIndexChange = true;
clear();
m_controller.m_contextFileData = diffFileList;
showDiff();
m_controller.m_ignoreCurrentIndexChange = oldIgnore;
}
QString UnifiedDiffEditorWidget::showChunk(const ChunkData &chunkData,