diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h index c3084aee38..1b9a2a70b1 100644 --- a/gtk2_ardour/midi_region_view.h +++ b/gtk2_ardour/midi_region_view.h @@ -292,6 +292,8 @@ public: void trim_front_ending (); void create_note_at (framepos_t, double, double, bool); + + void clear_selection (bool signal = true) { clear_selection_except (0, signal); } protected: /** Allows derived types to specify their visibility requirements @@ -353,7 +355,6 @@ private: ARDOUR::MidiModel::TimeType end_delta); void clear_selection_except (ArdourCanvas::CanvasNoteEvent* ev, bool signal = true); - void clear_selection (bool signal = true) { clear_selection_except (0, signal); } void update_drag_selection (double last_x, double x, double last_y, double y, bool extend); void update_vertical_drag_selection (double last_y, double y, bool extend); diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index 676aa52028..311327f0ec 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -647,3 +647,14 @@ MidiStreamView::resume_updates () draw_note_lines (); apply_note_range_to_regions (); } + +void +MidiStreamView::leave_internal_edit_mode () +{ + StreamView::leave_internal_edit_mode (); + for (RegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) { + MidiRegionView* mrv = dynamic_cast (*i); + assert (mrv); + mrv->clear_selection (); + } +} diff --git a/gtk2_ardour/midi_streamview.h b/gtk2_ardour/midi_streamview.h index d216752eda..1e6289d63c 100644 --- a/gtk2_ardour/midi_streamview.h +++ b/gtk2_ardour/midi_streamview.h @@ -76,6 +76,8 @@ class MidiStreamView : public StreamView void redisplay_track (); + void leave_internal_edit_mode (); + inline double contents_height() const { return (child_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2); }