Fixed inverted subtraction in the previous commit.

This commit is contained in:
Stephen Anthony 2018-02-01 19:52:32 -03:30
parent c18bcbc39b
commit 883a9249b1
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ int TimeLineWidget::posToValue(int pos)
// it is closest to
for(uInt32 i = 0; i < _stepValue.size() - 1; ++i)
if(pos >= _stepValue[i] && pos <= _stepValue[i+1])
return (_stepValue[i+1] - pos) < (_stepValue[i] - pos) ? i+1 : i;
return (_stepValue[i+1] - pos) < (pos - _stepValue[i]) ? i+1 : i;
return _valueMax;
}