Moved refreshing of target pin states, upon an IO port update event, to target package widget class.
Functionality for the target package widget is now completely contained within the TargetPackageWidget class (and derivations).
This commit is contained in:
@@ -23,15 +23,11 @@ TargetPackageWidget::TargetPackageWidget(
|
||||
|
||||
this->connect(
|
||||
&(this->insightWorker),
|
||||
&InsightWorker::targetPinStatesUpdated,
|
||||
&InsightWorker::targetIoPortsUpdated,
|
||||
this,
|
||||
[this] (int variantId, const Targets::TargetPinStateMappingType& pinStatesByNumber) {
|
||||
if (variantId == this->targetVariant.id) {
|
||||
this->updatePinStates(pinStatesByNumber);
|
||||
|
||||
if (this->targetState == TargetState::STOPPED && !this->isEnabled()) {
|
||||
this->setDisabled(false);
|
||||
}
|
||||
[this] {
|
||||
if (this->targetState == TargetState::STOPPED) {
|
||||
this->refreshPinStates();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user