Ripple mode: basic implementation

Add a value for Ripple to EditMode enum.

Add Ripple edit mode to edit mode dropdown, by adding it to the
Editor::build_edit_mode_menu() helper function, and remove the old code that
added items to the (now unused) Editor::edit_mode_strings.

Add the regions that should be affected by the drag to RegionDrag::_views so
that the drag carries them along automatically.

Use a copy of the RegionList in Playlist::core_ripple(), since bad things
happen when iterating over regions and they get moved around in the list.

Handle rippling in removal of regions from playlist.

When dragging in ripple mode, exclude all regions that lie before the
original start position of the selected regions being dragged from
rippling: this is what Mixbus does.

Make editor dragging respect snap-to settings, by using the existing
compute_x_delta() function, which did almost the right thing. Move setting
of _last_frame_position out of that function so all ripple-dragged regions
can move.

Ripple when dragging from region list: even though Mixbus doesn't do this, it
seems like a good idea.

Prevent multi-track selection being dragged across tracks, by making
RegionMotionDrag::y_movement_allowed() virtual, and overriding it in
RegionRippleDrag to forbid dragging of selections containing regions on more
than one track to dofferent tracks in ripple mode.

Remember which TimeAxisView a ripple-mode drag that's allowed cross-track
drags started from, so that the effect of rippling regions after any region
that's dragged off that track can be undone.
This commit is contained in:
Colin Fletcher 2013-10-23 21:50:01 +01:00
parent ce8e374cf8
commit d75c7151d4
14 changed files with 431 additions and 30 deletions

View file

@ -1613,7 +1613,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void edit_mode_selection_done ( ARDOUR::EditMode m );
void build_edit_mode_menu ();
Gtk::VBox edit_mode_box;
std::vector<std::string> edit_mode_strings;
void set_edit_mode (ARDOUR::EditMode);
void cycle_edit_mode ();
@ -2092,6 +2091,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
friend class RegionDrag;
friend class RegionMoveDrag;
friend class RegionSpliceDrag;
friend class RegionRippleDrag;
friend class TrimDrag;
friend class MeterMarkerDrag;
friend class TempoMarkerDrag;