mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-24 04:59:24 -06:00
More property work
Add StringProperty Add possibility for callbacks Switch RenderablePlanet to use Properties
This commit is contained in:
@@ -93,9 +93,11 @@ void PropertyOwner::addProperty(Property* prop) {
|
||||
<< "' already present in PropertyOwner");
|
||||
return;
|
||||
}
|
||||
else
|
||||
else {
|
||||
// Otherwise we have found the correct position to add it in
|
||||
_properties.insert(it, prop);
|
||||
prop->setPropertyOwner(this);
|
||||
}
|
||||
}
|
||||
|
||||
void PropertyOwner::addProperty(Property& prop) {
|
||||
@@ -114,6 +116,7 @@ void PropertyOwner::removeProperty(Property* prop) {
|
||||
|
||||
// If we found the property identifier, we can delete it
|
||||
if (it != _properties.end() && (*it)->identifier() == prop->identifier()) {
|
||||
(*it)->setPropertyOwner(nullptr);
|
||||
_properties.erase(it);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user