midi cue view can use midi view's canvas event method directly

This commit is contained in:
Paul Davis
2024-12-11 08:31:41 -07:00
parent bbcacc586f
commit 755aeb74b0
3 changed files with 4 additions and 9 deletions

View File

@@ -65,11 +65,12 @@ MidiCueView::MidiCueView (std::shared_ptr<ARDOUR::MidiTrack> mt,
event_rect = new ArdourCanvas::Rectangle (&parent);
event_rect->set (ArdourCanvas::Rect (0.0, 0.0, ArdourCanvas::COORD_MAX, 10.));
event_rect->Event.connect (sigc::mem_fun (*this, &MidiCueView::canvas_event));
event_rect->set_fill (false);
event_rect->set_outline (false);
CANVAS_DEBUG_NAME (event_rect, "cue event rect");
parent.Event.connect (sigc::mem_fun (*this, &MidiView::canvas_group_event));
_note_group->raise_to_top ();
automation_group = new ArdourCanvas::Rectangle (&parent);
@@ -121,12 +122,6 @@ MidiCueView::drag_group () const
return event_rect;
}
bool
MidiCueView::canvas_event (GdkEvent* ev)
{
return MidiView::canvas_group_event (ev);
}
bool
MidiCueView::scroll (GdkEventScroll* ev)
{

View File

@@ -50,7 +50,6 @@ class MidiCueView : public MidiView
~MidiCueView();
bool canvas_event (GdkEvent*);
void set_samples_per_pixel (double);
void set_height (double);

View File

@@ -351,6 +351,8 @@ class MidiView : public virtual sigc::trackable, public LineMerger
void show_start (bool yn);
void show_end (bool yn);
virtual bool canvas_group_event(GdkEvent* ev);
protected:
void init (std::shared_ptr<ARDOUR::MidiTrack>);
virtual void region_resized (const PBD::PropertyChange&);
@@ -447,7 +449,6 @@ class MidiView : public virtual sigc::trackable, public LineMerger
virtual void ghost_add_note (NoteBase*) {}
virtual void ghost_sync_selection (NoteBase*) {}
virtual bool canvas_group_event(GdkEvent* ev);
bool note_canvas_event(GdkEvent* ev);
PBD::ScopedConnectionList connections_requiring_model;