timeruler: add ability to resize markers and workarea

This commit is contained in:
itsmattkc
2022-05-09 17:53:21 -07:00
parent 7d370320d8
commit 0f99d8a662
8 changed files with 218 additions and 23 deletions
+3 -4
View File
@@ -204,9 +204,7 @@ void TimelineMarkerList::HandleMarkerTimeChange()
auto it = std::find(markers_.begin(), markers_.end(), m);
if ((it+1 != markers_.end() && (*(it+1))->time() < m->time())
|| (it != markers_.begin() && (*(it-1))->time() > m->time())) {
// Re-sort into list
if (it != markers_.end()) {
markers_.erase(it);
InsertIntoList(m);
}
@@ -304,8 +302,9 @@ void MarkerChangeNameCommand::undo()
marker_->set_name(old_name_);
}
MarkerChangeTimeCommand::MarkerChangeTimeCommand(TimelineMarker* marker, TimeRange time) :
MarkerChangeTimeCommand::MarkerChangeTimeCommand(TimelineMarker* marker, const TimeRange &time, const TimeRange &old_time) :
marker_(marker),
old_time_(old_time),
new_time_(time)
{
}