diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-24 13:46:07 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-24 13:46:07 -0400 |
commit | 2ea5962af2a389277703c6eebc2160cf52302468 (patch) | |
tree | 17e13680e0823c8eb6d933f9ff4a7f466871c051 /libs/surfaces/osc/osc.cc | |
parent | 2b81d4d0feb06a18d31463ab884de5e56722a346 (diff) |
rationalize save/restore of control surface "feedback" property
Diffstat (limited to 'libs/surfaces/osc/osc.cc')
-rw-r--r-- | libs/surfaces/osc/osc.cc | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index 5878b34d80..727485d83c 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -1090,25 +1090,14 @@ OSC::route_plugin_parameter_print (int rid, int piid, int par) XMLNode& OSC::get_state () { - XMLNode& node (ControlProtocol::get_state()); - - node.add_property (X_("feedback"), _send_route_changes ? "1" : "0"); - return node; + return ControlProtocol::get_state(); } int -OSC::set_state (const XMLNode& node, int /*version*/) +OSC::set_state (const XMLNode& node, int version) { - const XMLProperty* prop = node.property (X_("feedback")); - - if (prop) { - if (PBD::string_is_affirmative (prop->value())) { - _send_route_changes = true; - } else { - _send_route_changes = false; - } - } else { - /* leave it alone */ + if (ControlProtocol::set_state (node, version)) { + return -1; } return 0; |