From 8601ab0fe6c5782cc38de48576eb2f7c4fb2ccef Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 23 Apr 2012 02:26:46 +0000 Subject: Fire signal and update GUI correctly when renaming ports. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4251 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/ResourceImpl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/shared') diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp index 95f2031a..2a2ceb96 100644 --- a/src/shared/ResourceImpl.cpp +++ b/src/shared/ResourceImpl.cpp @@ -34,9 +34,11 @@ ResourceImpl::add_property(const Raul::URI& uri, // Ignore duplicate statements typedef Resource::Properties::const_iterator iterator; const std::pair range = _properties.equal_range(uri); - for (iterator i = range.first; i != range.second && i != _properties.end(); ++i) - if (i->second == value && i->second.context() == ctx) + for (iterator i = range.first; i != range.second && i != _properties.end(); ++i) { + if (i->second == value && i->second.context() == ctx) { return; + } + } const Raul::Atom& v = _properties.insert(make_pair(uri, Property(value, ctx)))->second; on_property(uri, v); -- cgit v1.2.1