From 7a037841a4440ef3a4bd3067cdbd4e9a619e379c Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 21 Jun 2016 23:00:07 +0300 Subject: [PATCH] BinEditor: Clear data on setSizes Was removed in 5098787a. Jumping to an address in the current view doesn't refresh the data. Task-number: QTCREATORBUG-11064 Change-Id: Ib9682f7809ada58d7a67683415fec818a8c00620 Reviewed-by: hjk --- src/plugins/bineditor/bineditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/bineditor/bineditor.cpp b/src/plugins/bineditor/bineditor.cpp index ff8cc3f1bfa..1f287ff0458 100644 --- a/src/plugins/bineditor/bineditor.cpp +++ b/src/plugins/bineditor/bineditor.cpp @@ -401,6 +401,7 @@ void BinEditorWidget::setSizes(quint64 startAddr, qint64 range, int blockSize) m_blockSize = blockSize; m_emptyBlock = QByteArray(blockSize, '\0'); + m_data.clear(); m_modifiedData.clear(); m_requests.clear(); @@ -1567,7 +1568,6 @@ void BinEditorWidget::setNewWindowRequestAllowed(bool c) void BinEditorWidget::updateContents() { m_oldData = m_data; - m_data.clear(); setSizes(baseAddress() + cursorPosition(), m_size, m_blockSize); }