diff options
-rw-r--r-- | src/Parser.cpp | 14 |
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; } |