From 83e4b49a9e4a77bd365d18fbf905c5b7fc38b725 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 13 Jan 2024 17:56:33 +0100 Subject: [PATCH] Retain first-selected-stripable when removing ATAV This allows ctrl surfaces (notably Faderport) to keep editing plugin settings, when some unrelated plugin is removed. Route::processors_changed calls RouteTimeAxisView::processors_changed, and if a plugin automation line vanishes ~AutomationTimeAxisView deselected the track. This triggered a control surface update. --- gtk2_ardour/selection.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index aaa09cd9b5..831f4143ac 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -1493,7 +1493,10 @@ Selection::remove (const TrackViewList& t) PresentationInfo::ChangeSuspender cs; for (TrackSelection::const_iterator i = t.begin(); i != t.end(); ++i) { - std::shared_ptr s = (*i)->stripable (); + std::shared_ptr s; + if (!dynamic_cast (*i)) { + s = (*i)->stripable (); + } std::shared_ptr c = (*i)->control (); selection.remove (s, c); }