diff options
Diffstat (limited to 'src/server/events/Delta.cpp')
-rw-r--r-- | src/server/events/Delta.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 072d0ba3..0c134ede 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -148,9 +148,10 @@ Delta::pre_process() NodeImpl* obj = dynamic_cast<NodeImpl*>(_object); + // Remove any properties removed in delta for (const auto& r : _remove) { - const Raul::URI& key = r.first; - const Atom& value = r.second; + const Raul::URI& key = r.first; + const Atom& value = r.second; if (key == uris.midi_binding && value == uris.patch_wildcard) { PortImpl* port = dynamic_cast<PortImpl*>(_object); if (port) @@ -161,6 +162,13 @@ Delta::pre_process() } } + // Remove all added properties if this is a put + if (_create && _object) { + for (const auto& p : _properties) { + _object->remove_property(p.first, p.second); + } + } + for (const auto& p : _properties) { const Raul::URI& key = p.first; const Resource::Property& value = p.second; |