Only create MIDI regions on click when in draw mode.
authorDavid Robillard <d@drobilla.net>
Sat, 15 Nov 2014 07:03:40 +0000 (02:03 -0500)
committerDavid Robillard <d@drobilla.net>
Sat, 15 Nov 2014 07:03:40 +0000 (02:03 -0500)
It was much too easy to accidentally create MIDI regions in object mode.  If
the user isn't in draw mode anyway, then even after creating a region, they
can't put notes in it, so I don't think we've lost any discoverability here.

gtk2_ardour/editor_drag.cc

index 0aaec8d24d5e4e8129b1f919fd2b5bf45d668696..1237c73c3dc2f83dccffca9107b9cb233f766c4b 100644 (file)
@@ -3970,7 +3970,7 @@ RubberbandSelectDrag::finished (GdkEvent* event, bool movement_occurred)
 
                if ((mtv = dynamic_cast<MidiTimeAxisView*>(_editor->clicked_axisview)) != 0) {
                        /* MIDI track */
-                       if (_editor->selection->empty()) {
+                       if (_editor->selection->empty() && _editor->mouse_mode == MouseDraw) {
                                /* nothing selected */
                                add_midi_region (mtv);
                                do_deselect = false;