diff options
author | Johannes Mueller <github@johannes-mueller.org> | 2020-04-13 22:14:32 +0200 |
---|---|---|
committer | Johannes Mueller <github@johannes-mueller.org> | 2020-04-13 23:56:52 +0200 |
commit | d5f25f998bb5a5cb8aefbba8679e63ffa0062d55 (patch) | |
tree | 6bf6ad39c3bf068173cabdb275176785da780b64 /gtk2_ardour/editor_drag.cc | |
parent | 83353b3125f637684557d2e5c6040974b65da7c0 (diff) |
Fix #7007: ::clear_owned_changes() on rippled Playlist before commit
RegionMoveDrag::finished_no_copy() calls ::clear_changes() on every selected
Region and then sets their positions again before committing the command to the
UndoHistory. By doing that no changes from the previous transaction spill over
into the current transaction.
This needs to be done in a similar way by in RegionRippleDrag::finished()
because otherwise a following undo action would also undo the changes of the
previous transaction for all the non selected rippled regions.
RegionRippleDrags across tracks are still borked, though.
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 81d3bae02d..32fd9a1935 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -2414,7 +2414,6 @@ RegionRippleDrag::finished (GdkEvent* event, bool movement_occurred) // remove the regions being rippled from the dragging view, updating them to // their new positions - remove_unselected_from_views (prev_amount, true); if (allow_moves_across_tracks) { if (orig_tav) { @@ -2422,6 +2421,8 @@ RegionRippleDrag::finished (GdkEvent* event, bool movement_occurred) // regions on the track the regions were dragged off, so we need // to add the original track to the undo record orig_tav->playlist()->clear_changes(); + orig_tav->playlist()->clear_owned_changes(); + remove_unselected_from_views (prev_amount, true); vector<Command*> cmds; orig_tav->playlist()->rdiff (cmds); _editor->session()->add_commands (cmds); @@ -2440,6 +2441,11 @@ RegionRippleDrag::finished (GdkEvent* event, bool movement_occurred) for (pi = playlists.begin(); pi != playlists.end(); ++pi) { (*pi)->clear_changes(); + (*pi)->clear_owned_changes(); + } + remove_unselected_from_views (prev_amount, true); + + for (pi = playlists.begin(); pi != playlists.end(); ++pi) { vector<Command*> cmds; (*pi)->rdiff (cmds); _editor->session()->add_commands (cmds); |