swallow all events in pianoroll automation group if there's no active automation
This commit is contained in:
@@ -104,6 +104,7 @@ PianorollMidiView::PianorollMidiView (std::shared_ptr<ARDOUR::MidiTrack> mt,
|
|||||||
_note_group->raise_to_top ();
|
_note_group->raise_to_top ();
|
||||||
|
|
||||||
automation_group = new ArdourCanvas::Rectangle (&parent);
|
automation_group = new ArdourCanvas::Rectangle (&parent);
|
||||||
|
automation_group->Event.connect (sigc::mem_fun (*this, &PianorollMidiView::automation_group_event));
|
||||||
CANVAS_DEBUG_NAME (automation_group, "cue automation group");
|
CANVAS_DEBUG_NAME (automation_group, "cue automation group");
|
||||||
automation_group->set_fill_color (UIConfiguration::instance().color ("midi automation track fill"));
|
automation_group->set_fill_color (UIConfiguration::instance().color ("midi automation track fill"));
|
||||||
automation_group->set_data ("linemerger", this);
|
automation_group->set_data ("linemerger", this);
|
||||||
@@ -118,6 +119,16 @@ PianorollMidiView::~PianorollMidiView ()
|
|||||||
delete velocity_display;
|
delete velocity_display;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
PianorollMidiView::automation_group_event (GdkEvent* ev)
|
||||||
|
{
|
||||||
|
if (!active_automation) {
|
||||||
|
/* Eat the event to prevent the parent seeing it */
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PianorollMidiView::midi_canvas_group_event (GdkEvent* ev)
|
PianorollMidiView::midi_canvas_group_event (GdkEvent* ev)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ class PianorollMidiView : public MidiView
|
|||||||
void unset_active_automation ();
|
void unset_active_automation ();
|
||||||
|
|
||||||
bool midi_canvas_group_event (GdkEvent*);
|
bool midi_canvas_group_event (GdkEvent*);
|
||||||
|
bool automation_group_event (GdkEvent*);
|
||||||
Gtkmm2ext::Color line_color_for (Evoral::Parameter const &);
|
Gtkmm2ext::Color line_color_for (Evoral::Parameter const &);
|
||||||
|
|
||||||
void reset_width_dependent_items (double pixel_width);
|
void reset_width_dependent_items (double pixel_width);
|
||||||
|
|||||||
Reference in New Issue
Block a user