Move color to TimelineMarker and make sure all instances of a marker update on color change

This commit is contained in:
Thomas Wilshaw
2021-10-22 22:15:50 +01:00
parent 562b0e3a7f
commit 575ce39696
5 changed files with 29 additions and 3 deletions
+3
View File
@@ -143,6 +143,9 @@ void SeekableWidget::addMarker(TimelineMarker* marker)
Marker *marker_widget = new Marker(this);
marker_map_.insert(marker, marker_widget);
connect(marker_widget, &Marker::ColorChanged, marker, &TimelineMarker::set_color);
connect(marker, &TimelineMarker::ColorChanged, marker_widget, &Marker::SetColor);
marker_widget->move(TimeToScreen(marker->time().in()), 20);
marker_widget->show();
}