diff options
author | Robin Gareus <robin@gareus.org> | 2020-03-02 18:17:25 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-03-02 19:18:50 +0100 |
commit | 14c670869c12e20c62c9a3a7e3adb5c361bfa56d (patch) | |
tree | 23ab44fd5b9ba642629a37ac235c4e86333896e7 /gtk2_ardour/route_ui.cc | |
parent | 7f11270c96c1fd7e32f235ce207608455ebb3a23 (diff) |
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.
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 10 |
1 files changed, 3 insertions, 7 deletions
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<Route> 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<Track> t = boost::dynamic_pointer_cast<Track>(_route); @@ -2018,12 +2018,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 () { /* remove old 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 |