From 81c3bf175a311b8dffab62d775db9829d438a5c7 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 22 Jan 2020 01:45:18 +0100 Subject: Keep track/bus number visible when disabling track --- gtk2_ardour/route_time_axis.cc | 8 ++++++-- gtk2_ardour/time_axis_view.cc | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 1166fb8be8..357ee29a91 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -447,10 +447,12 @@ RouteTimeAxisView::update_track_number_visibility () } if (number_label.get_parent()) { - controls_table.remove (number_label); + number_label.get_parent()->remove (number_label); } if (show_label) { - if (ARDOUR::Profile->get_mixbus()) { + if (!_route->active()) { + inactive_table.attach (number_label, 0, 1, 0, 1, Gtk::SHRINK, Gtk::EXPAND|Gtk::FILL, 1, 0); + } else if (ARDOUR::Profile->get_mixbus()) { controls_table.attach (number_label, 3, 4, 0, 1, Gtk::SHRINK, Gtk::EXPAND|Gtk::FILL, 1, 0); } else { controls_table.attach (number_label, 0, 1, 0, 1, Gtk::SHRINK, Gtk::EXPAND|Gtk::FILL, 1, 0); @@ -470,6 +472,8 @@ RouteTimeAxisView::update_track_number_visibility () void RouteTimeAxisView::route_active_changed () { + RouteUI::route_active_changed (); + update_track_number_visibility (); } void diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index f5b3cce11f..f6d6f4b00c 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -190,7 +190,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie controls_table.set_no_show_all (); inactive_table.set_border_width (4); //try to match the offset of the label on an "active" track - inactive_table.attach (inactive_label, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0); + inactive_table.attach (inactive_label, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0); controls_vbox.pack_start (inactive_table, false, false); controls_vbox.pack_start (controls_table, false, false); -- cgit v1.2.3