mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
Implement "multi-paste" for notes, regions, and automation.
The idea here is that pasting several times to the same location doesn't make sense. Instead, the paste is appended past the last paste, snapped to the grid. This make it simple to replicate a given section a number of times, simply by copying once and pasting several times. This behaviour only appears when successive pastes are done to the same location (whatever the edit point is). When the paste point changes, the "multi-paste" state is reset. Boots 'n cats 'n boots 'n cats.
This commit is contained in:
parent
b01d1813f8
commit
31acd96384
11 changed files with 80 additions and 17 deletions
|
|
@ -313,6 +313,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
/* nudge is initiated by transport controls owned by ARDOUR_UI */
|
||||
|
||||
framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next);
|
||||
framecnt_t get_paste_offset (framepos_t pos, unsigned paste_count, framecnt_t duration);
|
||||
Evoral::MusicalTime get_grid_type_as_beats (bool& success, framepos_t position);
|
||||
|
||||
void nudge_forward (bool next, bool force_playhead);
|
||||
|
|
@ -1109,6 +1110,11 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
Gtkmm2ext::ActionMap editor_action_map;
|
||||
Gtkmm2ext::Bindings key_bindings;
|
||||
|
||||
/* CUT/COPY/PASTE */
|
||||
|
||||
framepos_t last_paste_pos;
|
||||
unsigned paste_count;
|
||||
|
||||
void cut_copy (Editing::CutCopyOp);
|
||||
bool can_cut_copy () const;
|
||||
void cut_copy_points (Editing::CutCopyOp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue