NO-OP: whitespace
[ardour.git] / libs / ardour / solo_isolate_control.cc
index a913a9810e45b4b9691cbde9f5595751b7bff099..9be6e1a7d586e2513c043c3353e384dc51ccf411 100644 (file)
@@ -21,7 +21,7 @@
 #include "ardour/session.h"
 #include "ardour/solo_isolate_control.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace ARDOUR;
 using namespace std;
@@ -42,7 +42,7 @@ SoloIsolateControl::SoloIsolateControl (Session& session, std::string const & na
 }
 
 void
-SoloIsolateControl::master_changed (bool from_self, PBD::Controllable::GroupControlDisposition gcd, boost::shared_ptr<AutomationControl>)
+SoloIsolateControl::master_changed (bool from_self, PBD::Controllable::GroupControlDisposition gcd, boost::weak_ptr<AutomationControl>)
 {
        if (!_soloable.can_solo()) {
                return;
@@ -84,8 +84,6 @@ SoloIsolateControl::mod_solo_isolated_by_upstream (int32_t delta)
        }
 
        if (solo_isolated() != old) {
-               /* solo isolated status changed */
-               _muteable.mute_master()->set_solo_ignore (solo_isolated());
                Changed (false, Controllable::NoGroup); /* EMIT SIGNAL */
        }
 }
@@ -104,7 +102,6 @@ SoloIsolateControl::actually_set_value (double val, PBD::Controllable::GroupCont
        */
 
        AutomationControl::actually_set_value (val, gcd);
-       _session.set_dirty ();
 }
 
 void
@@ -118,14 +115,12 @@ SoloIsolateControl::set_solo_isolated (bool yn, Controllable::GroupControlDispos
 
        if (yn) {
                if (_solo_isolated == false) {
-                       _muteable.mute_master()->set_solo_ignore (true);
                        changed = true;
                }
                _solo_isolated = true;
        } else {
                if (_solo_isolated == true) {
                        _solo_isolated = false;
-                       _muteable.mute_master()->set_solo_ignore (false);
                        changed = true;
                }
        }
@@ -146,8 +141,7 @@ double
 SoloIsolateControl::get_value () const
 {
        if (slaved()) {
-               Glib::Threads::RWLock::ReaderLock lm (master_lock);
-               return get_masters_value_locked () ? 1.0 : 0.0;
+               return solo_isolated() || get_masters_value ();
        }
 
        if (_list && boost::dynamic_pointer_cast<AutomationList>(_list)->automation_playback()) {
@@ -155,18 +149,17 @@ SoloIsolateControl::get_value () const
                return AutomationControl::get_value();
        }
 
-       return solo_isolated () ? 1.0 : 0.0;
+       return solo_isolated ();
 }
 
 int
-SoloIsolateControl::set_state (XMLNode const & node, int)
+SoloIsolateControl::set_state (XMLNode const & node, int version)
 {
-       XMLProperty const * prop;
-
-       if ((prop = node.property ("solo-isolated")) != 0) {
-               _solo_isolated = string_is_affirmative (prop->value());
+       if (SlavableAutomationControl::set_state(node, version)) {
+               return -1;
        }
 
+       node.get_property ("solo-isolated", _solo_isolated);
        return 0;
 }
 
@@ -174,6 +167,6 @@ XMLNode&
 SoloIsolateControl::get_state ()
 {
        XMLNode& node (SlavableAutomationControl::get_state());
-       node.add_property (X_("solo-isolated"), _solo_isolated ? X_("yes") : X_("no"));
+       node.set_property (X_("solo-isolated"), _solo_isolated);
        return node;
 }