Check AND switch before clearing LS

This commit is contained in:
elecpower
2021-04-06 06:34:11 +10:00
parent 066b4eb7d7
commit 43655faee2
+5 -4
View File
@@ -695,13 +695,14 @@ int ModelData::updateReference()
default:
break;
}
if (clearlsd) {
if (lsd->andsw != 0)
updateSwitchIntRef(lsd->andsw);
if (clearlsd && lsd->andsw == 0) {
lsd->clear();
appendUpdateReferenceParams(REF_UPD_TYPE_LOGICAL_SWITCH, REF_UPD_ACT_CLEAR, i);
}
else if (lsd->andsw != 0) {
updateSwitchIntRef(lsd->andsw);
}
}
}
//s1.report("Logical Switches");