diff Source/Mappings/Control/TouchkeyControlMappingFactory.cpp @ 43:fa39caec190b

Fix to default values of MIDI controllers
author Andrew McPherson <andrewm@eecs.qmul.ac.uk>
date Sat, 23 Aug 2014 21:39:46 +0100
parents 85577160a0d4
children 90ce403d0dc5
line wrap: on
line diff
--- a/Source/Mappings/Control/TouchkeyControlMappingFactory.cpp	Thu Aug 21 17:02:39 2014 +0100
+++ b/Source/Mappings/Control/TouchkeyControlMappingFactory.cpp	Sat Aug 23 21:39:46 2014 +0100
@@ -240,6 +240,7 @@
     properties.setValue("ignoresTwoFingers", ignoresTwoFingers_);
     properties.setValue("ignoresThreeFingers", ignoresThreeFingers_);
     properties.setValue("direction", direction_);
+    properties.setValue("use14Bit", use14BitControl_);
     
     XmlElement* preset = properties.createXml("MappingFactory");
     preset->setAttribute("type", "Control");
@@ -277,6 +278,11 @@
     ignoresThreeFingers_ = properties.getBoolValue("ignoresThreeFingers");
     direction_ = properties.getIntValue("direction");
     
+    // These values added to later versions of the presets so check
+    // whether they actually exist or not
+    if(properties.containsKey("use14Bit"))
+        use14BitControl_ = properties.getBoolValue("use14Bit");
+    
     // Update MIDI information; this doesn't actually change the controller
     // (which is already set) but it adds a listener and updates the ranges
     setController(midiControllerNumber_);