remove duplicated calls to update solo/mute state from RouteUI descendants.
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 Mar 2015 16:31:06 +0000 (12:31 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 Mar 2015 16:31:06 +0000 (12:31 -0400)
RouteUI::set_route() already does the right thing. Also remove RouteUI::mute_changed() since its
only role was to handle the mute change signal from a route, which boost::bind() makes unnecessary
since we can connect update_mute_display() directly.

gtk2_ardour/mixer_strip.cc
gtk2_ardour/route_time_axis.cc
gtk2_ardour/route_ui.cc
gtk2_ardour/route_ui.h

index 117145d9d0be544371830c8afa001264f4d120f5..48da9af7e074f46203ac56ce894f0f362a1eb188 100644 (file)
@@ -451,11 +451,6 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
        */
        processor_box.set_route (rt);
 
-       /* map the current state */
-
-       mute_changed (0);
-       update_solo_display ();
-
        revert_to_default_display ();
 
        /* unpack these from the parent and stuff them into our own
@@ -602,7 +597,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
 
        /* now force an update of all the various elements */
 
-       mute_changed (0);
+       update_mute_display ();
        update_solo_display ();
        name_changed ();
        comment_changed (0);
index 7d0883775dbf0d773b99d1cb3a31eb63b9ea6296..597b9ecde4ba526588500640b203948b3975ebaf 100644 (file)
@@ -156,9 +156,6 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
                set_gui_property ("visible", false);
        }
 
-       mute_changed (0);
-       update_solo_display ();
-
        timestretch_rect = 0;
        no_redraw = false;
 
index f038ead366c798eb582ba4021ceefd03bd91dcd0..09026e6b2968507f3fe9ae40576d45d8df4d6513 100644 (file)
@@ -244,7 +244,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
        solo_button->set_controllable (_route->solo_control());
 
        _route->active_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_active_changed, this), gui_context());
-       _route->mute_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::mute_changed, this, _1), gui_context());
+       _route->mute_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_mute_display, this), gui_context());
 
        _route->comment_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::comment_changed, this, _1), gui_context());
 
@@ -1186,12 +1186,6 @@ RouteUI::solo_changed_so_update_mute ()
        update_mute_display ();
 }
 
-void
-RouteUI::mute_changed(void* /*src*/)
-{
-       update_mute_display ();
-}
-
 ActiveState
 RouteUI::mute_active_state (Session* s, boost::shared_ptr<Route> r)
 {
index 569fe125525a3cbd201120161da2c32aad6012d3..0da95cdc238fe4614d444b5e932d349c092432b3 100644 (file)
@@ -157,7 +157,6 @@ class RouteUI : public virtual AxisView
 
        void solo_changed(bool, void*);
        void solo_changed_so_update_mute ();
-       void mute_changed(void*);
        void listen_changed(void*);
        virtual void processors_changed (ARDOUR::RouteProcessorChange) {}
        void route_rec_enable_changed();