Allow to delete PC using <Del>
authorRobin Gareus <robin@gareus.org>
Sun, 3 May 2015 00:18:40 +0000 (02:18 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 3 May 2015 00:20:28 +0000 (02:20 +0200)
It currently only works if there’s no prior selection of notes
in which case the MRV handles the event.

gtk2_ardour/patch_change.cc

index 601011d01773da41c0dacecb5506a41f750b2eea..1bcf8d940ee684d0e4b36329be2d739068daa5ef 100644 (file)
@@ -212,6 +212,16 @@ PatchChange::event_handler (GdkEvent* ev)
                }
                break;
 
+       case GDK_KEY_RELEASE:
+               switch (ev->key.keyval) {
+               case GDK_BackSpace:
+               case GDK_Delete:
+                       _region.delete_patch_change (this);
+               default:
+                       break;
+               }
+               break;
+
        case GDK_SCROLL:
                if (ev->scroll.direction == GDK_SCROLL_UP) {
                        _region.step_patch(