Prevented unnecessary refreshing in Insight window on target reset and resumed events.

This commit is contained in:
Nav
2022-06-04 21:53:13 +01:00
parent b3af06654c
commit accea6a08c

View File

@@ -117,8 +117,10 @@ namespace Bloom
}
void InsightWorker::onTargetResumedEvent(const Events::TargetExecutionResumed& event) {
this->lastTargetState = TargetState::RUNNING;
emit this->targetStateUpdated(TargetState::RUNNING);
if (this->lastTargetState != TargetState::RUNNING) {
this->lastTargetState = TargetState::RUNNING;
emit this->targetStateUpdated(TargetState::RUNNING);
}
}
void InsightWorker::onTargetResetEvent(const Events::TargetReset& event) {
@@ -127,9 +129,11 @@ namespace Bloom
return;
}
this->lastTargetState = TargetState::STOPPED;
emit this->targetStateUpdated(TargetState::RUNNING);
emit this->targetStateUpdated(TargetState::STOPPED);
if (this->lastTargetState != TargetState::STOPPED) {
this->lastTargetState = TargetState::STOPPED;
emit this->targetStateUpdated(TargetState::STOPPED);
}
emit this->targetProgramCounterUpdated(this->targetControllerConsole.getProgramCounter());
} catch (const Exceptions::Exception& exception) {