From 44c2d6f45f4dc77feb4f64ec4fface4a212a8b06 Mon Sep 17 00:00:00 2001 From: Nav Date: Mon, 6 Dec 2021 21:28:52 +0000 Subject: [PATCH] Spinning refresh button, when refresh is in progress, in memory inspection pane --- .../HexViewerWidget/HexViewerWidget.cpp | 2 +- .../HexViewerWidget/HexViewerWidget.hpp | 2 +- .../TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp index 4df6b0b7..7f64a7ed 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp @@ -44,7 +44,7 @@ HexViewerWidget::HexViewerWidget( this->toolBar = this->container->findChild("tool-bar"); this->bottomBar = this->container->findChild("bottom-bar"); - this->refreshButton = this->toolBar->findChild("refresh-memory-btn"); + this->refreshButton = this->toolBar->findChild("refresh-memory-btn"); this->highlightStackMemoryButton = this->toolBar->findChild("highlight-stack-memory-btn"); this->highlightHoveredRowAndColumnButton = this->toolBar->findChild( "highlight-hovered-rows-columns-btn" diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.hpp index 139b6ba9..18763cb9 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.hpp @@ -28,7 +28,7 @@ namespace Bloom::Widgets Q_OBJECT public: - QToolButton* refreshButton = nullptr; + SvgToolButton* refreshButton = nullptr; HexViewerWidget( const Targets::TargetMemoryDescriptor& targetMemoryDescriptor, diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp index f14eee11..1047d4de 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp @@ -74,6 +74,7 @@ TargetMemoryInspectionPane::TargetMemoryInspectionPane( void TargetMemoryInspectionPane::refreshMemoryValues(std::optional> callback) { this->hexViewerWidget->refreshButton->setDisabled(true); + this->hexViewerWidget->refreshButton->startSpin(); auto* readMemoryTask = new ReadTargetMemory( this->targetMemoryDescriptor.type, @@ -107,6 +108,7 @@ void TargetMemoryInspectionPane::refreshMemoryValues(std::optionalhexViewerWidget->refreshButton->stopSpin(); this->hexViewerWidget->refreshButton->setDisabled(false); } );