From 0cf0de8c97285ee17a6f01c07e38bccf79779112 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 25 Jan 2022 05:06:08 +0100 Subject: [PATCH] Remove indirection when showing/hiding TAV --- gtk2_ardour/editor.cc | 10 +++++++--- gtk2_ardour/editor_route_groups.cc | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index b94121d890..87d70bf96b 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -5804,8 +5804,9 @@ Editor::hide_track_in_display (TimeAxisView* tv, bool apply_to_selection) /* this will hide the mixer strip */ set_selected_mixer_strip (*tv); } - - _routes->hide_track_in_display (*tv); + if (rtv) { + rtv->route()->presentation_info().set_hidden (true); + } } } @@ -5815,7 +5816,10 @@ Editor::show_track_in_display (TimeAxisView* tv, bool move_into_view) if (!tv) { return; } - _routes->show_track_in_display (*tv); + RouteTimeAxisView* rtv = dynamic_cast (tv); + if (rtv) { + rtv->route()->presentation_info().set_hidden (false); + } if (move_into_view) { ensure_time_axis_view_is_visible (*tv, false); } diff --git a/gtk2_ardour/editor_route_groups.cc b/gtk2_ardour/editor_route_groups.cc index 4b6503677e..50b19bd50d 100644 --- a/gtk2_ardour/editor_route_groups.cc +++ b/gtk2_ardour/editor_route_groups.cc @@ -515,7 +515,7 @@ EditorRouteGroups::property_changed (RouteGroup* group, const PropertyChange&) if (group->is_hidden ()) { _editor->hide_track_in_display (*i); } else { - _editor->_routes->show_track_in_display (**i); + _editor->show_track_in_display (*i); } } }