Fix crash when adding events to disabled MIDI event-lane
In case of MIDI CC/Bend/Pressure etc events, the underlying data is provided by a MidiTrack (is-a Automatable) and not an automation-control. When directly calling AutomationControl::set_automation_state, the AC disables automation-watch using shared_from_this(). With the Evoral::Control used for MidiTrack event-lists this results in a tr1::bad_weak_ptr.
This commit is contained in:
parent
62aae6cffb
commit
2245042b85
@ -214,7 +214,7 @@ AutomationRegionView::add_automation_event (GdkEvent *, timepos_t const & w, dou
|
|||||||
if (_line->the_list()->editor_add (when, y, with_guard_points)) {
|
if (_line->the_list()->editor_add (when, y, with_guard_points)) {
|
||||||
|
|
||||||
if (ac->automation_state () == ARDOUR::Off) {
|
if (ac->automation_state () == ARDOUR::Off) {
|
||||||
ac->set_automation_state (ARDOUR::Play);
|
view->set_automation_state (ARDOUR::Play);
|
||||||
}
|
}
|
||||||
if (UIConfiguration::instance().get_automation_edit_cancels_auto_hide () && ac == view->session()->recently_touched_controllable ()) {
|
if (UIConfiguration::instance().get_automation_edit_cancels_auto_hide () && ac == view->session()->recently_touched_controllable ()) {
|
||||||
RouteTimeAxisView::signal_ctrl_touched (false);
|
RouteTimeAxisView::signal_ctrl_touched (false);
|
||||||
|
@ -791,8 +791,9 @@ AutomationTimeAxisView::add_automation_event (GdkEvent* event, timepos_t const &
|
|||||||
if (list->editor_add (when, y, with_guard_points)) {
|
if (list->editor_add (when, y, with_guard_points)) {
|
||||||
|
|
||||||
if (_control->automation_state () == ARDOUR::Off) {
|
if (_control->automation_state () == ARDOUR::Off) {
|
||||||
_control->set_automation_state (ARDOUR::Play);
|
set_automation_state (ARDOUR::Play);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UIConfiguration::instance().get_automation_edit_cancels_auto_hide () && _control == _session->recently_touched_controllable ()) {
|
if (UIConfiguration::instance().get_automation_edit_cancels_auto_hide () && _control == _session->recently_touched_controllable ()) {
|
||||||
RouteTimeAxisView::signal_ctrl_touched (false);
|
RouteTimeAxisView::signal_ctrl_touched (false);
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,8 @@ public:
|
|||||||
return _show_regions;
|
return _show_regions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_automation_state (ARDOUR::AutoState);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* Note that for MIDI controller "automation" (in regions), all of these
|
/* Note that for MIDI controller "automation" (in regions), all of these
|
||||||
* may be set. In this case, _automatable is likely _route so the
|
* may be set. In this case, _automatable is likely _route so the
|
||||||
@ -190,7 +192,6 @@ protected:
|
|||||||
bool paste_one (Temporal::timepos_t const &, unsigned, float times, const Selection&, ItemCounts& counts, bool greedy=false);
|
bool paste_one (Temporal::timepos_t const &, unsigned, float times, const Selection&, ItemCounts& counts, bool greedy=false);
|
||||||
void route_going_away ();
|
void route_going_away ();
|
||||||
|
|
||||||
void set_automation_state (ARDOUR::AutoState);
|
|
||||||
bool ignore_state_request;
|
bool ignore_state_request;
|
||||||
bool ignore_mode_request;
|
bool ignore_mode_request;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user