Towards fixing AU preset invalidation
[ardour.git] / libs / ardour / solo_safe_control.cc
index 7e8de603a7b65c2779f450e8896f42487acd19e7..2efb1254c7c35555f8b625e17a09602d7655c821 100644 (file)
@@ -36,7 +36,7 @@ SoloSafeControl::SoloSafeControl (Session& session, std::string const & name)
        _list->set_interpolation(Evoral::ControlList::Discrete);
 }
 
-bool
+void
 SoloSafeControl::actually_set_value (double val, PBD::Controllable::GroupControlDisposition gcd)
 {
        _solo_safe = (val ? true : false);
@@ -45,12 +45,7 @@ SoloSafeControl::actually_set_value (double val, PBD::Controllable::GroupControl
           be retrieved by AutomationControl::get_value (), and emits Changed
        */
 
-       if (AutomationControl::actually_set_value (val, gcd)) {
-           _session.set_dirty ();
-           return true;
-       }
-
-       return false;
+       AutomationControl::actually_set_value (val, gcd);
 }
 
 double
@@ -76,12 +71,7 @@ SoloSafeControl::set_state (XMLNode const & node, int version)
                return -1;
        }
 
-       XMLProperty const * prop;
-
-       if ((prop = node.property ("solo-safe")) != 0) {
-               _solo_safe = string_is_affirmative (prop->value());
-       }
-
+       node.get_property ("solo-safe", _solo_safe);
        return 0;
 }
 
@@ -89,6 +79,6 @@ XMLNode&
 SoloSafeControl::get_state ()
 {
        XMLNode& node (SlavableAutomationControl::get_state());
-       node.add_property (X_("solo-safe"), _solo_safe ? X_("yes") : X_("no"));
+       node.set_property (X_("solo-safe"), _solo_safe);
        return node;
 }