diff options
author | nick_m <mainsbridge@gmail.com> | 2015-11-01 05:22:55 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-11-01 05:22:55 +1100 |
commit | 336f8d47fe810ee9d057632854e009f1616d272e (patch) | |
tree | e491f108f3b74b676dd26253b542ad983ecd03ed /gtk2_ardour/editor_mouse.cc | |
parent | 0e809dd1d5add0aa9ad9c931da812dad60faa7c6 (diff) |
Clarify context menu for midi notes.
- right click on a note selects it if unselected or selection empty.
- note_context_menu is shown as described in #6348
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 23961cef91..7740cb9b17 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -458,7 +458,9 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it /* almost no selection action on modified button-2 or button-3 events */ - if ((item_type != RegionItem && event->button.button != 2) && !(item_type == ControlPointItem && event->button.button == 3)) { + if ((item_type != RegionItem && event->button.button != 2) + /* for selection of control points prior to delete (shift-right click) */ + && !(item_type == ControlPointItem && event->button.button == 3 && event->type == GDK_BUTTON_PRESS)) { return; } } @@ -628,6 +630,20 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it } break; + case NoteItem: + if (press && event->button.button == 3) { + NoteBase* cnote = reinterpret_cast<NoteBase*> (item->get_data ("notebase")); + assert (cnote); + if (cnote->region_view().selection_size() == 0 || !cnote->selected()) { + selection->clear_points(); + cnote->region_view().unique_select (cnote); + /* we won't get the release, so store the selection change now */ + begin_reversible_selection_op (X_("Button 3 Note Selection")); + commit_reversible_selection_op (); + } + } + break; + default: break; } |