From 620e6dc06aeaed19046607ad261ffdf994ca240c Mon Sep 17 00:00:00 2001 From: Nav Date: Tue, 6 Sep 2022 01:05:46 +0100 Subject: [PATCH] Corrected bug with memory inspection refresh button continuing to spin upon refresh error --- .../TargetMemoryInspectionPane.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp index 7740baa3..c1a42e19 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp @@ -296,6 +296,20 @@ namespace Bloom::Widgets callback.value() ); } + + } else { + QObject::connect( + readMemoryTask, + &InsightWorkerTask::failed, + this, + [this] { + this->refreshButton->stopSpin(); + + if (this->targetState == Targets::TargetState::STOPPED) { + this->refreshButton->setDisabled(false); + } + } + ); } this->insightWorker.queueTask(readMemoryTask);