aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-23 21:38:03 +0200
committerDavid Robillard <d@drobilla.net>2018-09-23 21:38:03 +0200
commit754c696dc2c755d3bcaca96246ab81381edc0ad1 (patch)
tree2cb7610fd0bfa5802ebfef51ba8f510f25130a0e /src
parent5d13ad11340a73214642245f4418aec9f197186d (diff)
downloadingen-754c696dc2c755d3bcaca96246ab81381edc0ad1.tar.gz
ingen-754c696dc2c755d3bcaca96246ab81381edc0ad1.tar.bz2
ingen-754c696dc2c755d3bcaca96246ab81381edc0ad1.zip
Parse overridden properties with a single PUT
Diffstat (limited to 'src')
-rw-r--r--src/Parser.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Parser.cpp b/src/Parser.cpp
index c9736a71..0288497e 100644
--- a/src/Parser.cpp
+++ b/src/Parser.cpp
@@ -503,13 +503,19 @@ parse_properties(ingen::World* world,
{
Properties properties = get_properties(world, model, subject, ctx);
- target->put(uri, properties, ctx);
-
- // Set passed properties last to override any loaded values
+ // Replace any properties given in `data`
if (data) {
- target->put(uri, data.get(), ctx);
+ for (const auto& prop : *data) {
+ properties.erase(prop.first);
+ }
+
+ for (const auto& prop : *data) {
+ properties.emplace(prop);
+ }
}
+ target->put(uri, properties, ctx);
+
return true;
}