Fixes #2381: time based V2 params were not formated properly. Time unit also added.
This commit is contained in:
@@ -309,7 +309,10 @@ void LogicalSwitchesPanel::setSwitchWidgetVisibility(int i)
|
||||
int maxTime = round(range.max);
|
||||
int value = round(range.step*model->logicalSw[i].val2 + range.offset);
|
||||
cswitchTOffset[i]->setMaximumTime(QTimeS(maxTime));
|
||||
cswitchTOffset[i]->setDisplayFormat((maxTime>=3600)?"hh:mm:ss":"mm:ss");
|
||||
QString format = (maxTime>=3600) ? "hh:mm:ss" : "mm:ss";
|
||||
if (!range.unit.isEmpty())
|
||||
format += QString("' [%1]'").arg(range.unit);
|
||||
cswitchTOffset[i]->setDisplayFormat(format);
|
||||
cswitchTOffset[i]->setTime(QTimeS(value));
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user