From 14c670869c12e20c62c9a3a7e3adb5c361bfa56d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 2 Mar 2020 18:17:25 +0100 Subject: Fix polarity invert buttons (amend d6315618da) ConfigurationChanged() is emitted after processors have been reconfigured (e.g adding/removing a plugin). The button state needs to be updated after setup. Bfore d6315618da this worked because _route->io_changed() is emitted before the processors are re-configured, and phase_control()->Changed() triggered an update after that. PS. The motivation for d6315618da are Mixbusses. They have no input channels, but a Return processor before the polarity processor. --- gtk2_ardour/route_ui.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'gtk2_ardour/route_ui.cc') diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 15c04c8e55..08d9cb2929 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -352,7 +352,7 @@ RouteUI::set_route (boost::shared_ptr rp) _route->PropertyChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_property_changed, this, _1), gui_context()); _route->presentation_info().PropertyChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_gui_changed, this, _1), gui_context ()); - _route->polarity()->ConfigurationChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::polarity_configuration_changed, this, _1, _2), gui_context()); + _route->polarity()->ConfigurationChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::setup_invert_buttons, this), gui_context()); if (_session->writable() && is_track()) { boost::shared_ptr t = boost::dynamic_pointer_cast(_route); @@ -2017,12 +2017,6 @@ RouteUI::parameter_changed (string const & p) } } -void -RouteUI::polarity_configuration_changed (const ChanCount in, const ChanCount out) -{ - setup_invert_buttons(); -} - void RouteUI::setup_invert_buttons () { @@ -2068,6 +2062,8 @@ RouteUI::setup_invert_buttons () _invert_button_box.set_spacing (1); _invert_button_box.show_all (); + + set_invert_button_state (); } void -- cgit v1.2.3