summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-03-02 18:17:25 +0100
committerRobin Gareus <robin@gareus.org>2020-03-02 19:18:50 +0100
commit14c670869c12e20c62c9a3a7e3adb5c361bfa56d (patch)
tree23ab44fd5b9ba642629a37ac235c4e86333896e7 /gtk2_ardour/route_ui.cc
parent7f11270c96c1fd7e32f235ce207608455ebb3a23 (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.cc10
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