Allow to remove user-defined properties

This commit is contained in:
wmayer
2012-11-04 13:24:22 +01:00
parent 482a73b302
commit 77144681ef
9 changed files with 57 additions and 0 deletions
+12
View File
@@ -245,6 +245,18 @@ Property* DynamicProperty::addDynamicProperty(const char* type, const char* name
return pcProperty;
}
bool DynamicProperty::removeDynamicProperty(const char* name)
{
std::map<std::string,PropData>::iterator it = props.find(name);
if (it != props.end()) {
delete it->second.property;
props.erase(it);
return true;
}
return false;
}
std::string DynamicProperty::getUniquePropertyName(const char *Name) const
{
std::string CleanName = Base::Tools::getIdentifier(Name);