From 735f79c5f0cfaa7fe7c1d9d67dd56b3d5c7dc9c5 Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 8 Dec 2021 20:11:20 +0000 Subject: [PATCH] Corrected bug with memory inspection panes not disabling the hex view widget in certain instances, when target execution is resumed --- .../TargetMemoryInspectionPane.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp index 1047d4de..159531d0 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp @@ -159,15 +159,13 @@ void TargetMemoryInspectionPane::onTargetStateChanged(Targets::TargetState newSt using Targets::TargetState; this->targetState = newState; - if (this->activated) { - if (newState == TargetState::STOPPED) { - this->refreshMemoryValues([this] { - this->hexViewerWidget->setDisabled(false); - }); + if (newState == TargetState::STOPPED && this->activated) { + this->refreshMemoryValues([this] { + this->hexViewerWidget->setDisabled(false); + }); - } else { - this->hexViewerWidget->setDisabled(true); - } + } else if (newState == TargetState::RUNNING) { + this->hexViewerWidget->setDisabled(true); } }