When TimeLineWidget is empty, it now displays as such.

This commit is contained in:
Stephen Anthony 2018-02-04 12:14:23 -03:30
parent f29dcfece1
commit 997751b64f
2 changed files with 9 additions and 7 deletions

View File

@ -90,11 +90,13 @@ void TimeLineWidget::setStepValues(const IntArray& steps)
// Skip the very last value; we take care of it outside the end of the loop
for(uInt32 i = 0; i < steps.size() - 1; ++i)
_stepValue.push_back(int(steps[i] * scale));
}
// Due to integer <-> double conversion, the last value is sometimes
// slightly less than the maximum value; we assign it manually to fix this
_stepValue.push_back(_w - _labelWidth - 2);
// Due to integer <-> double conversion, the last value is sometimes
// slightly less than the maximum value; we assign it manually to fix this
_stepValue.push_back(_w - _labelWidth - 2);
}
else
_stepValue.push_back(0);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -28,12 +28,12 @@ class TimeLineWidget : public ButtonWidget
uInt32 labelWidth = 0, int cmd = 0);
void setValue(uInt32 value);
uInt32 getValue() const { return _value; }
uInt32 getValue() const { return _value; }
void setMinValue(uInt32 value);
uInt32 getMinValue() const { return _valueMin; }
void setMaxValue(uInt32 value);
uInt32 getMaxValue() const { return _valueMax; }
uInt32 getMinValue() const { return _valueMin; }
uInt32 getMaxValue() const { return _valueMax; }
/**
Steps are not necessarily linear in a timeline, so we need info