From 1a2376856343b6ea535af37050deb1b6ff7b052f Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 4 May 2018 09:40:18 +0200 Subject: [PATCH] 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 --- src/plugins/diffeditor/unifieddiffeditorwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/diffeditor/unifieddiffeditorwidget.cpp b/src/plugins/diffeditor/unifieddiffeditorwidget.cpp index 54ca275a581..83767e0a728 100644 --- a/src/plugins/diffeditor/unifieddiffeditorwidget.cpp +++ b/src/plugins/diffeditor/unifieddiffeditorwidget.cpp @@ -284,9 +284,12 @@ void UnifiedDiffEditorWidget::setDiff(const QList &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,