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.
This commit is contained in:
Robin Gareus 2020-03-02 18:17:25 +01:00
parent 7f11270c96
commit 14c670869c
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 3 additions and 8 deletions

View File

@ -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);
@ -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

View File

@ -186,7 +186,6 @@ public:
virtual void processors_changed (ARDOUR::RouteProcessorChange) {}
void route_rec_enable_changed();
void session_rec_enable_changed();
void polarity_configuration_changed (const ARDOUR::ChanCount in, const ARDOUR::ChanCount out);
void build_solo_menu ();