fix(cpn): logical switch move units refresh (#5183)
This commit is contained in:
@@ -371,6 +371,7 @@ void LogicalSwitchesPanel::updateLine(int i)
|
|||||||
|
|
||||||
cbFunction[i]->setCurrentIndex(cbFunction[i]->findData(model->logicalSw[i].func));
|
cbFunction[i]->setCurrentIndex(cbFunction[i]->findData(model->logicalSw[i].func));
|
||||||
cbAndSwitch[i]->setCurrentIndex(cbAndSwitch[i]->findData(RawSwitch(model->logicalSw[i].andsw).toValue()));
|
cbAndSwitch[i]->setCurrentIndex(cbAndSwitch[i]->findData(RawSwitch(model->logicalSw[i].andsw).toValue()));
|
||||||
|
dsbOffset[i]->setSuffix("");
|
||||||
|
|
||||||
if (!model->logicalSw[i].isEmpty()) {
|
if (!model->logicalSw[i].isEmpty()) {
|
||||||
mask = LINE_ENABLED | DELAY_ENABLED | DURATION_ENABLED;
|
mask = LINE_ENABLED | DELAY_ENABLED | DURATION_ENABLED;
|
||||||
@@ -395,9 +396,7 @@ void LogicalSwitchesPanel::updateLine(int i)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mask |= VALUE2_VISIBLE;
|
mask |= VALUE2_VISIBLE;
|
||||||
if (range.unit.isEmpty())
|
if (!range.unit.isEmpty())
|
||||||
dsbOffset[i]->setSuffix("");
|
|
||||||
else
|
|
||||||
dsbOffset[i]->setSuffix(" " + range.unit);
|
dsbOffset[i]->setSuffix(" " + range.unit);
|
||||||
dsbOffset[i]->setDecimals(range.decimals);
|
dsbOffset[i]->setDecimals(range.decimals);
|
||||||
dsbOffset[i]->setMinimum(range.min);
|
dsbOffset[i]->setMinimum(range.min);
|
||||||
|
|||||||
Reference in New Issue
Block a user