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

View File

@ -31,8 +31,8 @@ class TimeLineWidget : public ButtonWidget
uInt32 getValue() const { return _value; } uInt32 getValue() const { return _value; }
void setMinValue(uInt32 value); void setMinValue(uInt32 value);
uInt32 getMinValue() const { return _valueMin; }
void setMaxValue(uInt32 value); void setMaxValue(uInt32 value);
uInt32 getMinValue() const { return _valueMin; }
uInt32 getMaxValue() const { return _valueMax; } uInt32 getMaxValue() const { return _valueMax; }
/** /**