diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index dbf48a00df..bd83579c42 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -718,3 +718,25 @@ MidiRegionView::hide_region_editor () delete _editor; _editor = nullptr; } + +void +MidiRegionView::trim_front_starting () +{ + /* We used to eparent the note group to the region view's parent, so that it didn't change. + now we update it. + */ +} + +void +MidiRegionView::trim_front_ending () +{ + if (!_midi_region) { + return; + } + + if (_midi_region->start().is_negative()) { + /* Trim drag made start time -ve; fix this */ + midi_region()->fix_negative_start (_editing_context.history()); + } +} + diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h index 4d2d0b26e4..9c5af44d1c 100644 --- a/gtk2_ardour/midi_region_view.h +++ b/gtk2_ardour/midi_region_view.h @@ -138,6 +138,9 @@ public: void show_region_editor (); void hide_region_editor (); + void trim_front_starting (); + void trim_front_ending (); + protected: void reset_width_dependent_items (double pixel_width); void parameter_changed (std::string const & p); diff --git a/gtk2_ardour/midi_view.cc b/gtk2_ardour/midi_view.cc index 34af8a6b5d..c81b60e9a7 100644 --- a/gtk2_ardour/midi_view.cc +++ b/gtk2_ardour/midi_view.cc @@ -4785,27 +4785,6 @@ MidiView::data_recorded (std::weak_ptr w) _midi_context.record_layer_check (_midi_region, back); } -void -MidiView::trim_front_starting () -{ - /* We used to eparent the note group to the region view's parent, so that it didn't change. - now we update it. - */ -} - -void -MidiView::trim_front_ending () -{ - if (!_midi_region) { - return; - } - - if (_midi_region->start().is_negative()) { - /* Trim drag made start time -ve; fix this */ - midi_region()->fix_negative_start (); - } -} - void MidiView::edit_patch_change (PatchChange* pc) { diff --git a/gtk2_ardour/midi_view.h b/gtk2_ardour/midi_view.h index 701900d107..ba89c5108a 100644 --- a/gtk2_ardour/midi_view.h +++ b/gtk2_ardour/midi_view.h @@ -338,9 +338,6 @@ class MidiView : public virtual sigc::trackable, public LineMerger void set_channel_selector_scoped_note(NoteBase* note){ _channel_selection_scoped_note = note; } NoteBase* channel_selector_scoped_note(){ return _channel_selection_scoped_note; } - void trim_front_starting (); - void trim_front_ending (); - /** Add a note to the model, and the view, at a canvas (click) coordinate. * \param t time in samples relative to the position of the region * \param y vertical position in pixels