use correct event struct when handling key events in patch changes, and flip semantics for next/prev bank so that the direction in numerical terms matches next/prev patch (i.e. up arrow goes to higher numbers)
git-svn-id: svn://localhost/ardour2/branches/3.0@13043 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
35eba54e51
commit
9816ed02c7
@ -187,7 +187,7 @@ CanvasPatchChange::on_event (GdkEvent* ev)
|
|||||||
case GDK_Up:
|
case GDK_Up:
|
||||||
case GDK_KP_Up:
|
case GDK_KP_Up:
|
||||||
case GDK_uparrow:
|
case GDK_uparrow:
|
||||||
if (Keyboard::modifier_state_contains (ev->scroll.state, Keyboard::PrimaryModifier)) {
|
if (Keyboard::modifier_state_contains (ev->key.state, Keyboard::PrimaryModifier)) {
|
||||||
_region.previous_bank (*this);
|
_region.previous_bank (*this);
|
||||||
} else {
|
} else {
|
||||||
_region.previous_patch (*this);
|
_region.previous_patch (*this);
|
||||||
@ -196,7 +196,7 @@ CanvasPatchChange::on_event (GdkEvent* ev)
|
|||||||
case GDK_Down:
|
case GDK_Down:
|
||||||
case GDK_KP_Down:
|
case GDK_KP_Down:
|
||||||
case GDK_downarrow:
|
case GDK_downarrow:
|
||||||
if (Keyboard::modifier_state_contains (ev->scroll.state, Keyboard::PrimaryModifier)) {
|
if (Keyboard::modifier_state_contains (ev->key.state, Keyboard::PrimaryModifier)) {
|
||||||
_region.next_bank (*this);
|
_region.next_bank (*this);
|
||||||
} else {
|
} else {
|
||||||
_region.next_patch (*this);
|
_region.next_patch (*this);
|
||||||
|
@ -1972,7 +1972,7 @@ MidiRegionView::next_patch (CanvasPatchChange& patch)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiRegionView::previous_bank (CanvasPatchChange& patch)
|
MidiRegionView::next_bank (CanvasPatchChange& patch)
|
||||||
{
|
{
|
||||||
if (patch.patch()->program() < 127) {
|
if (patch.patch()->program() < 127) {
|
||||||
MIDI::Name::PatchPrimaryKey key = patch_change_to_patch_key (patch.patch());
|
MIDI::Name::PatchPrimaryKey key = patch_change_to_patch_key (patch.patch());
|
||||||
@ -1984,7 +1984,7 @@ MidiRegionView::previous_bank (CanvasPatchChange& patch)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiRegionView::next_bank (CanvasPatchChange& patch)
|
MidiRegionView::previous_bank (CanvasPatchChange& patch)
|
||||||
{
|
{
|
||||||
if (patch.patch()->program() > 0) {
|
if (patch.patch()->program() > 0) {
|
||||||
MIDI::Name::PatchPrimaryKey key = patch_change_to_patch_key (patch.patch());
|
MIDI::Name::PatchPrimaryKey key = patch_change_to_patch_key (patch.patch());
|
||||||
|
Loading…
Reference in New Issue
Block a user