From 99e31ac158444717c130f0e6c553b2a63132f350 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Sun, 4 Feb 2018 10:14:58 +0100 Subject: [PATCH] fixed time bar issue with no states --- src/gui/TimeLineWidget.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/TimeLineWidget.cxx b/src/gui/TimeLineWidget.cxx index 76e490c1d..b79496561 100644 --- a/src/gui/TimeLineWidget.cxx +++ b/src/gui/TimeLineWidget.cxx @@ -188,7 +188,10 @@ void TimeLineWidget::drawWidget(bool hilite) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -