diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-05-02 15:16:56 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-05-02 15:16:56 -0400 |
commit | d14f43ccf2eef9c43ecb44f7973962e634d17590 (patch) | |
tree | efd9e64b6ec655e46e3d049a65e12110f0af0f97 /gtk2_ardour | |
parent | 81485faa83e8dd0b9244550865e7d8fda3abf8ee (diff) |
fix operation of right-click on selected MIDI note to bring up the note editor. this is still not really right long term, but it is better than displaying the channel selector
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/canvas-note-event.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 23 | ||||
-rw-r--r-- | gtk2_ardour/public_editor.h | 1 |
4 files changed, 12 insertions, 16 deletions
diff --git a/gtk2_ardour/canvas-note-event.cc b/gtk2_ardour/canvas-note-event.cc index 867e3cdf1c..8932633bd9 100644 --- a/gtk2_ardour/canvas-note-event.cc +++ b/gtk2_ardour/canvas-note-event.cc @@ -338,7 +338,7 @@ CanvasNoteEvent::on_event(GdkEvent* ev) case GDK_BUTTON_PRESS: set_mouse_fractions (ev); if (ev->button.button == 3 && Keyboard::no_modifiers_active (ev->button.state) && _selected) { - show_channel_selector(); + _region.get_time_axis_view().editor().edit_notes (_region); return true; } break; diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 2a58a09d41..9293010d11 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1531,7 +1531,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void edit_tempo_marker (ArdourCanvas::Item*); void edit_meter_marker (ArdourCanvas::Item*); void edit_control_point (ArdourCanvas::Item*); - void edit_notes (std::set<Gnome::Canvas::CanvasNoteEvent *> const &); + void edit_notes (TimeAxisViewItem&); void marker_menu_edit (); void marker_menu_remove (); diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 2024d240e7..1a4399854f 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -978,10 +978,6 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT } if (internal_editing ()) { - if (event->type == GDK_2BUTTON_PRESS && event->button.button == 1) { - Glib::RefPtr<Action> act = ActionManager::get_action (X_("MouseMode"), X_("toggle-internal-edit")); - act->activate (); - } break; } @@ -1460,14 +1456,6 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT edit_control_point (item); break; - case NoteItem: - { - ArdourCanvas::CanvasNoteEvent* e = dynamic_cast<ArdourCanvas::CanvasNoteEvent*> (item); - assert (e); - edit_notes (e->region_view().selection ()); - break; - } - default: break; } @@ -2304,8 +2292,16 @@ Editor::edit_control_point (ArdourCanvas::Item* item) } void -Editor::edit_notes (MidiRegionView::Selection const & s) +Editor::edit_notes (TimeAxisViewItem& tavi) { + MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(&tavi); + + if (!mrv) { + return; + } + + MidiRegionView::Selection const & s = mrv->selection(); + if (s.empty ()) { return; } @@ -2317,7 +2313,6 @@ Editor::edit_notes (MidiRegionView::Selection const & s) d.run (); } - void Editor::visible_order_range (int* low, int* high) const { diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 4593da29f4..a96e451a31 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -291,6 +291,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible { virtual void add_to_idle_resize (TimeAxisView*, int32_t) = 0; virtual framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next) = 0; virtual Evoral::MusicalTime get_grid_type_as_beats (bool& success, framepos_t position) = 0; + virtual void edit_notes (TimeAxisViewItem&) = 0; virtual void queue_visual_videotimeline_update () = 0; virtual void toggle_ruler_video (bool) = 0; |