Browse Source

Don't deserialize left/rightModuleIds.

tags/v1.1.2
Andrew Belt 5 years ago
parent
commit
f855667f77
1 changed files with 11 additions and 10 deletions
  1. +11
    -10
      src/engine/Module.cpp

+ 11
- 10
src/engine/Module.cpp View File

@@ -157,20 +157,21 @@ void Module::fromJson(json_t *rootJ) {
if (bypassJ)
bypass = json_boolean_value(bypassJ);

// These do not need to be deserialized, since the module positions will set them correctly when added to the rack.
// // leftModuleId
// json_t *leftModuleIdJ = json_object_get(rootJ, "leftModuleId");
// if (leftModuleIdJ)
// leftExpander.moduleId = json_integer_value(leftModuleIdJ);

// // rightModuleId
// json_t *rightModuleIdJ = json_object_get(rootJ, "rightModuleId");
// if (rightModuleIdJ)
// rightExpander.moduleId = json_integer_value(rightModuleIdJ);

// data
json_t *dataJ = json_object_get(rootJ, "data");
if (dataJ)
dataFromJson(dataJ);

// leftModuleId
json_t *leftModuleIdJ = json_object_get(rootJ, "leftModuleId");
if (leftModuleIdJ)
leftExpander.moduleId = json_integer_value(leftModuleIdJ);

// rightModuleId
json_t *rightModuleIdJ = json_object_get(rootJ, "rightModuleId");
if (rightModuleIdJ)
rightExpander.moduleId = json_integer_value(rightModuleIdJ);
}




Loading…
Cancel
Save