Fix layered-record undo, include changes to existing region(s)
authorRobin Gareus <robin@gareus.org>
Tue, 13 Dec 2016 01:33:07 +0000 (02:33 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 13 Dec 2016 01:33:07 +0000 (02:33 +0100)
libs/ardour/playlist.cc

index 7b0f69e2ab44ff27078044446eb732e5f4c7cb3f..cc6c0d3f404d68ec6f86cd50caa0f2b39a26ea53 100644 (file)
@@ -680,6 +680,7 @@ Playlist::flush_notifications (bool from_undo)
                partition_internal (pos - 1, (pos + region->length()), true, thawlist);
                for (RegionList::iterator i = thawlist.begin(); i != thawlist.end(); ++i) {
                        (*i)->resume_property_changes ();
+                       _session.add_command (new StatefulDiffCommand (*i));
                }
         }
 
@@ -1006,6 +1007,7 @@ Playlist::flush_notifications (bool from_undo)
 
                                 /* "front" ***** */
 
+                                current->clear_changes ();
                                 current->suspend_property_changes ();
                                 thawlist.push_back (current);
                                 current->cut_end (pos2 - 1);
@@ -1046,6 +1048,7 @@ Playlist::flush_notifications (bool from_undo)
 
                                 /* front ****** */
 
+                                current->clear_changes ();
                                 current->suspend_property_changes ();
                                 thawlist.push_back (current);
                                 current->cut_end (pos2 - 1);
@@ -1090,6 +1093,7 @@ Playlist::flush_notifications (bool from_undo)
 
                                 /* end */
 
+                                current->clear_changes ();
                                 current->suspend_property_changes ();
                                 thawlist.push_back (current);
                                 current->trim_front (pos3);