Skip to content

Commit

Permalink
fix(cpn): logical switch move units refresh (#5183)
Browse files Browse the repository at this point in the history
  • Loading branch information
elecpower authored and pfeerick committed Jun 19, 2024
1 parent 7a4fd83 commit 6d7017b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions companion/src/modeledit/logicalswitches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,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;
Expand All @@ -376,9 +377,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);
Expand Down

0 comments on commit 6d7017b

Please sign in to comment.