fix(cpn): logical switch move units refresh (#5183)

This commit is contained in:
Neil Horne
2024-06-17 09:09:47 +10:00
committed by GitHub
parent 87cd8c8739
commit f1b387be23
+2 -3
View File
@@ -371,6 +371,7 @@ void LogicalSwitchesPanel::updateLine(int i)
cbFunction[i]->setCurrentIndex(cbFunction[i]->findData(model->logicalSw[i].func));
cbAndSwitch[i]->setCurrentIndex(cbAndSwitch[i]->findData(RawSwitch(model->logicalSw[i].andsw).toValue()));
dsbOffset[i]->setSuffix("");
if (!model->logicalSw[i].isEmpty()) {
mask = LINE_ENABLED | DELAY_ENABLED | DURATION_ENABLED;
@@ -395,9 +396,7 @@ void LogicalSwitchesPanel::updateLine(int i)
}
else {
mask |= VALUE2_VISIBLE;
if (range.unit.isEmpty())
dsbOffset[i]->setSuffix("");
else
if (!range.unit.isEmpty())
dsbOffset[i]->setSuffix(" " + range.unit);
dsbOffset[i]->setDecimals(range.decimals);
dsbOffset[i]->setMinimum(range.min);