-void
-MidiRegionView::apply_diff_as_subcommand ()
-{
- bool add_or_remove;
-
- if (!_note_diff_command) {
- return;
- }
-
- if ((add_or_remove = _note_diff_command->adds_or_removes())) {
- // Mark all selected notes for selection when model reloads
- for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
- _marked_for_selection.insert((*i)->note());
- }
- }
-
- _model->apply_command_as_subcommand(*trackview.session(), _note_diff_command);
- _note_diff_command = 0;
- midi_view()->midi_track()->playlist_modified();
-
- if (add_or_remove) {
- _marked_for_selection.clear();
- }
- _marked_for_velocity.clear();
-}
-
-