diff --git a/DSView/pv/view/timemarker.cpp b/DSView/pv/view/timemarker.cpp index 0a6b049b..2fba38f2 100644 --- a/DSView/pv/view/timemarker.cpp +++ b/DSView/pv/view/timemarker.cpp @@ -72,8 +72,11 @@ uint64_t TimeMarker::index() return _index; } -void TimeMarker::set_index(uint64_t index) +void TimeMarker::set_index(int64_t index) { + if (index < 0){ + index = 0; + } _index = index; time_changed(); } diff --git a/DSView/pv/view/timemarker.h b/DSView/pv/view/timemarker.h index 84cc0bcb..7cbe8136 100644 --- a/DSView/pv/view/timemarker.h +++ b/DSView/pv/view/timemarker.h @@ -66,7 +66,7 @@ public: /** * Sets the time of the marker. */ - void set_index(uint64_t index); + void set_index(int64_t index); /** * Gets/Sets colour of the marker