Make changing marker color undoable

This commit is contained in:
Thomas Wilshaw
2021-10-22 22:15:55 +01:00
parent 7af6f85a7c
commit 5c7073eab6
3 changed files with 45 additions and 1 deletions
+5 -1
View File
@@ -232,9 +232,13 @@ void SeekableWidget::removeMarker(TimelineMarker *marker)
void SeekableWidget::SetMarkerColor(int c)
{
MultiUndoCommand *command = new MultiUndoCommand();
foreach(TimelineMarker* marker, GetActiveTimelineMarkers()) {
marker->set_color(c);
command->add_child(new MarkerChangeColorCommand(Core::instance()->GetActiveProject(), marker, c));
}
Core::instance()->undo_stack()->pushIfHasChildren(command);
}
void SeekableWidget::updateMarkerPositions()