summaryrefslogtreecommitdiffstats
path: root/src/Resource.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-06-09 04:51:32 +0000
committerDavid Robillard <d@drobilla.net>2013-06-09 04:51:32 +0000
commitfe81cb8af20ecbe721eba55d53fa62c5e2041421 (patch)
tree98e94e5dcf675054ac6023ddbccd44b1381ddda0 /src/Resource.cpp
parentc8e00539e66bbe3584798ab8619f4b5927e83c2c (diff)
downloadingen-fe81cb8af20ecbe721eba55d53fa62c5e2041421.tar.gz
ingen-fe81cb8af20ecbe721eba55d53fa62c5e2041421.tar.bz2
ingen-fe81cb8af20ecbe721eba55d53fa62c5e2041421.zip
Support removing properties from the properties dialog.
You can definitely blow your leg off with this one, clever ontology awareness (e.g. required properties) would be good... git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5138 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Resource.cpp')
-rw-r--r--src/Resource.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Resource.cpp b/src/Resource.cpp
index a8e96e5d..cd448e32 100644
--- a/src/Resource.cpp
+++ b/src/Resource.cpp
@@ -54,6 +54,7 @@ Resource::set_property(const Raul::URI& uri,
++next;
if (i->second.context() == ctx) {
_properties.erase(i);
+ on_property_removed(uri, i->second);
}
i = next;
}
@@ -75,10 +76,11 @@ Resource::remove_property(const Raul::URI& uri, const Atom& value)
++i) {
if (i->second == value) {
_properties.erase(i);
- return;
+ break;
}
}
}
+ on_property_removed(uri, value);
}
bool
@@ -161,6 +163,7 @@ Resource::set_properties(const Properties& props)
// Erase existing properties with matching keys
for (const auto& p : props) {
_properties.erase(p.first);
+ on_property_removed(p.first, _uris.wildcard);
}
// Set new properties