Spinning refresh button, when refresh is in progress, in memory inspection pane
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Bloom::Widgets
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QToolButton* refreshButton = nullptr;
|
||||
SvgToolButton* refreshButton = nullptr;
|
||||
|
||||
HexViewerWidget(
|
||||
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user