Move patch changes when inserting silence at the start of a model.
git-svn-id: svn://localhost/ardour2/branches/3.0@11084 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
75a3964c10
commit
d771ca6b0e
@ -1868,7 +1868,7 @@ MidiModel::midi_source ()
|
||||
return _midi_source.lock ();
|
||||
}
|
||||
|
||||
/** Moves notes, controllers and sys-ex to insert silence at the start of the model.
|
||||
/** Moves notes, patch changes, controllers and sys-ex to insert silence at the start of the model.
|
||||
* Adds commands to the session's current undo stack to reflect the movements.
|
||||
*/
|
||||
void
|
||||
@ -1889,6 +1889,18 @@ MidiModel::insert_silence_at_start (TimeType t)
|
||||
apply_command_as_subcommand (s->session(), c);
|
||||
}
|
||||
|
||||
/* Patch changes */
|
||||
|
||||
if (!patch_changes().empty ()) {
|
||||
PatchChangeDiffCommand* c = new_patch_change_diff_command ("insert silence");
|
||||
|
||||
for (PatchChanges::const_iterator i = patch_changes().begin(); i != patch_changes().end(); ++i) {
|
||||
c->change_time (*i, (*i)->time() + t);
|
||||
}
|
||||
|
||||
apply_command_as_subcommand (s->session(), c);
|
||||
}
|
||||
|
||||
/* Controllers */
|
||||
|
||||
for (Controls::iterator i = controls().begin(); i != controls().end(); ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user