From 7c6c6290ee70df561da99df4479ec8ee3ccccc66 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 17 Oct 2022 23:17:37 +0200 Subject: [PATCH] Fix #8996 (show/hide VCAs from script) --- gtk2_ardour/editor.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 8ae55d2bd0..ecee883d9f 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -5908,14 +5908,15 @@ Editor::hide_track_in_display (TimeAxisView* tv, bool apply_to_selection) i = j; } } else { - RouteTimeAxisView* rtv = dynamic_cast (tv); + RouteTimeAxisView* rtv = dynamic_cast (tv); + StripableTimeAxisView* stv = dynamic_cast (tv); if (rtv && current_mixer_strip && (rtv->route() == current_mixer_strip->route())) { /* this will hide the mixer strip */ set_selected_mixer_strip (*tv); } - if (rtv) { - rtv->route()->presentation_info().set_hidden (true); + if (stv) { + stv->stripable()->presentation_info().set_hidden (true); /* TODO also handle Routegroups IFF (rg->is_hidden() && !rg->is_selection()) * selection currently unconditionally hides due to above if() clause :( */ @@ -5929,10 +5930,11 @@ Editor::show_track_in_display (TimeAxisView* tv, bool move_into_view) if (!tv) { return; } - RouteTimeAxisView* rtv = dynamic_cast (tv); - if (rtv) { - rtv->route()->presentation_info().set_hidden (false); + StripableTimeAxisView* stv = dynamic_cast (tv); + if (stv) { + stv->stripable()->presentation_info().set_hidden (false); #if 0 // TODO see above + RouteTimeAxisView* rtv = dynamic_cast (tv); RouteGroup* rg = rtv->route ()->route_group (); if (rg && rg->is_active () && rg->is_hidden () && !rg->is_select ()) { boost::shared_ptr rl (rg->route_list ());