+ property editor handles case when dynamic property is removed

This commit is contained in:
wmayer
2015-11-16 15:24:36 +01:00
parent 4f4d747968
commit ba21766096
10 changed files with 114 additions and 1 deletions

View File

@@ -29,6 +29,7 @@
#include "DynamicProperty.h"
#include "Property.h"
#include "PropertyContainer.h"
#include "Application.h"
#include <Base/Reader.h>
#include <Base/Writer.h>
#include <Base/Console.h>
@@ -242,6 +243,8 @@ Property* DynamicProperty::addDynamicProperty(const char* type, const char* name
data.hidden = hidden;
props[ObjectName] = data;
GetApplication().signalAppendDynamicProperty(*pcProperty);
return pcProperty;
}
@@ -249,6 +252,7 @@ bool DynamicProperty::removeDynamicProperty(const char* name)
{
std::map<std::string,PropData>::iterator it = props.find(name);
if (it != props.end()) {
GetApplication().signalRemoveDynamicProperty(*it->second.property);
delete it->second.property;
props.erase(it);
return true;