Set stale data flag in TargetMemoryInspectionPane, when the relevant memory type has been written to
This commit is contained in:
@@ -20,6 +20,7 @@ namespace Bloom::Widgets
|
||||
|
||||
using Bloom::Targets::TargetMemoryDescriptor;
|
||||
using Bloom::Targets::TargetMemoryType;
|
||||
using Bloom::Targets::TargetMemoryAddressRange;
|
||||
|
||||
TargetMemoryInspectionPane::TargetMemoryInspectionPane(
|
||||
const TargetMemoryDescriptor& targetMemoryDescriptor,
|
||||
@@ -213,6 +214,13 @@ namespace Bloom::Widgets
|
||||
&TargetMemoryInspectionPane::onProgrammingModeDisabled
|
||||
);
|
||||
|
||||
QObject::connect(
|
||||
insightSignals,
|
||||
&InsightSignals::targetMemoryWritten,
|
||||
this,
|
||||
&TargetMemoryInspectionPane::onTargetMemoryWritten
|
||||
);
|
||||
|
||||
// Restore the state
|
||||
if (this->state.attached) {
|
||||
this->attach();
|
||||
@@ -511,6 +519,15 @@ namespace Bloom::Widgets
|
||||
this->refreshButton->setDisabled(disabled);
|
||||
}
|
||||
|
||||
void TargetMemoryInspectionPane::onTargetMemoryWritten(
|
||||
TargetMemoryType memoryType,
|
||||
TargetMemoryAddressRange addressRange
|
||||
) {
|
||||
if (memoryType == this->targetMemoryDescriptor.type) {
|
||||
this->setStaleData(this->data.has_value());
|
||||
}
|
||||
}
|
||||
|
||||
void TargetMemoryInspectionPane::setStaleData(bool staleData) {
|
||||
this->staleData = staleData;
|
||||
this->staleDataLabelContainer->setVisible(this->staleData);
|
||||
|
||||
@@ -80,6 +80,10 @@ namespace Bloom::Widgets
|
||||
void onTargetReset();
|
||||
void onProgrammingModeEnabled();
|
||||
void onProgrammingModeDisabled();
|
||||
void onTargetMemoryWritten(
|
||||
Bloom::Targets::TargetMemoryType memoryType,
|
||||
Targets::TargetMemoryAddressRange addressRange
|
||||
);
|
||||
void setStaleData(bool staleData);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user