diff --git a/companion/src/modeledit/logicalswitches.cpp b/companion/src/modeledit/logicalswitches.cpp index e7da33f62..37751307b 100644 --- a/companion/src/modeledit/logicalswitches.cpp +++ b/companion/src/modeledit/logicalswitches.cpp @@ -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);