substitution fix
This commit is contained in:
@@ -194,6 +194,8 @@ PIValueTree PIValueTreeConversions::fromText(PIIODevice * device) {
|
||||
comm.trim();
|
||||
line.cutRight(1).trim();
|
||||
}
|
||||
for (const auto & s: substitutions)
|
||||
line.replaceAll("${" + s.first + "}", s.second);
|
||||
ind = line.find('=');
|
||||
if (ind > 0) {
|
||||
path = prefix;
|
||||
@@ -221,10 +223,7 @@ PIValueTree PIValueTreeConversions::fromText(PIIODevice * device) {
|
||||
}
|
||||
PIValueTree & leaf(ret[path]);
|
||||
leaf.setComment(comm);
|
||||
line = unmask(line);
|
||||
for (const auto & s: substitutions)
|
||||
line.replaceAll("${" + s.first + "}", s.second);
|
||||
leaf.setValue(line);
|
||||
leaf.setValue(unmask(line));
|
||||
substitutions[path.join('.')] = leaf.value().toString();
|
||||
if (!path.contains(_attribute_))
|
||||
if (!leaf.contains({_attribute_, "type"})) leaf[_attribute_].addChild({"type", type});
|
||||
|
||||
Reference in New Issue
Block a user