Spinning refresh button, when refresh is in progress, in memory inspection pane

This commit is contained in:
Nav
2021-12-06 21:28:52 +00:00
parent 51a288521f
commit 44c2d6f45f
3 changed files with 4 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ HexViewerWidget::HexViewerWidget(
this->toolBar = this->container->findChild<QWidget*>("tool-bar");
this->bottomBar = this->container->findChild<QWidget*>("bottom-bar");
this->refreshButton = this->toolBar->findChild<QToolButton*>("refresh-memory-btn");
this->refreshButton = this->toolBar->findChild<SvgToolButton*>("refresh-memory-btn");
this->highlightStackMemoryButton = this->toolBar->findChild<SvgToolButton*>("highlight-stack-memory-btn");
this->highlightHoveredRowAndColumnButton = this->toolBar->findChild<SvgToolButton*>(
"highlight-hovered-rows-columns-btn"

View File

@@ -28,7 +28,7 @@ namespace Bloom::Widgets
Q_OBJECT
public:
QToolButton* refreshButton = nullptr;
SvgToolButton* refreshButton = nullptr;
HexViewerWidget(
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor,

View File

@@ -74,6 +74,7 @@ TargetMemoryInspectionPane::TargetMemoryInspectionPane(
void TargetMemoryInspectionPane::refreshMemoryValues(std::optional<std::function<void(void)>> 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::optional<std::function
&InsightWorkerTask::completed,
this,
[this] {
this->hexViewerWidget->refreshButton->stopSpin();
this->hexViewerWidget->refreshButton->setDisabled(false);
}
);