fixed time bar issue with no states

This commit is contained in:
thrust26 2018-02-04 10:14:58 +01:00
parent de56f9cff5
commit 99e31ac158
1 changed files with 4 additions and 1 deletions

View File

@ -188,7 +188,10 @@ void TimeLineWidget::drawWidget(bool hilite)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int TimeLineWidget::valueToPos(int value) int TimeLineWidget::valueToPos(int value)
{ {
return _stepValue[BSPF::clamp(value, _valueMin, _valueMax)]; if(_valueMax >= 0)
return _stepValue[BSPF::clamp(value, _valueMin, _valueMax)];
else
return 0;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -