fix: the search cursor able move out off range

This commit is contained in:
dreamsourcelabTAI 2024-01-08 15:32:34 +08:00
parent 779825943e
commit 35af96b622
2 changed files with 5 additions and 2 deletions

View File

@ -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();
}

View File

@ -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