diff options
Diffstat (limited to 'src/projectserialiser.cc')
-rw-r--r-- | src/projectserialiser.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/projectserialiser.cc b/src/projectserialiser.cc index 6a204eb..59cb97d 100644 --- a/src/projectserialiser.cc +++ b/src/projectserialiser.cc @@ -192,11 +192,11 @@ QString ProjectSerialiser::serialise(const Project& project) } auto regions = doc.createElement("regions"); - regions.setAttribute("nextid", i.selections.nextid); - regions.setAttribute("act", i.selections.act); + regions.setAttribute("nextid", i.ranges.nextid); + regions.setAttribute("act", i.ranges.act); instrument.appendChild(regions); - for(auto r = i.selections.sels.begin(); r != i.selections.sels.end(); ++r) + for(auto r = i.ranges.sels.begin(); r != i.ranges.sels.end(); ++r) { auto region = doc.createElement("region"); region.setAttribute("id", (int)r.key()); @@ -292,20 +292,20 @@ bool ProjectSerialiser::deserialise(const QString& data, Project& project) instr.prefix = instrument("prefix").text(); - auto selections = instrument("regions"); - instr.selections.nextid = selections["nextid"].toInt(); - instr.selections.act = selections["act"].toInt(); + auto ranges = instrument("regions"); + instr.ranges.nextid = ranges["nextid"].toInt(); + instr.ranges.act = ranges["act"].toInt(); - for(auto& selection : selections.children()) + for(auto& range : ranges.children()) { - Selection s; - s.from = selection["from"].toInt(); - s.to = selection["to"].toInt(); - s.fadein = selection["fadein"].toInt(); - s.fadeout = selection["fadeout"].toInt(); - s.energy = selection["energy"].toFloat(); - s.name = selection["name"]; - instr.selections.sels[selection["id"].toInt()] = s; + Range s; + s.from = range["from"].toInt(); + s.to = range["to"].toInt(); + s.fadein = range["fadein"].toInt(); + s.fadeout = range["fadeout"].toInt(); + s.energy = range["energy"].toFloat(); + s.name = range["name"]; + instr.ranges.sels[range["id"].toInt()] = s; } } |