summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_region_view.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-17 20:18:11 -0500
committerDavid Robillard <d@drobilla.net>2014-12-17 20:18:11 -0500
commit5f6630034919bde73ffa603e7420c8af2c3c16f7 (patch)
treecd5b4d36e528d426087b20db465f24d5588ab5bd /gtk2_ardour/midi_region_view.cc
parentd2cafbe95a5784b7c306c24b0008379a41a909f7 (diff)
Support stepping bank by shift+scroll/arrow.
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r--gtk2_ardour/midi_region_view.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc
index 11534dd035..6b6d40f93c 100644
--- a/gtk2_ardour/midi_region_view.cc
+++ b/gtk2_ardour/midi_region_view.cc
@@ -1984,11 +1984,14 @@ MidiRegionView::delete_patch_change (PatchChange* pc)
}
void
-MidiRegionView::step_patch (PatchChange& patch, int dbank, int dprog)
+MidiRegionView::step_patch (PatchChange& patch, bool bank, int delta)
{
MIDI::Name::PatchPrimaryKey key = patch_change_to_patch_key(patch.patch());
- key.set_bank(key.bank() + dbank);
- key.set_program(key.program() + dprog);
+ if (bank) {
+ key.set_bank(key.bank() + delta);
+ } else {
+ key.set_program(key.program() + delta);
+ }
change_patch_change(patch, key);
}