Remove identifier from VirtualPropertyManager
Add VirtualPropertyManager to the query of allProperties
This commit is contained in:
Alexander Bock
2018-04-21 14:32:17 +00:00
parent 5e1f26cc6b
commit f7e5ba8fff
3 changed files with 20 additions and 1 deletions
+4
View File
@@ -178,6 +178,10 @@ OpenSpaceEngine::OpenSpaceEngine(std::string programName,
_rootPropertyOwner->addPropertySubOwner(_renderEngine.get());
_rootPropertyOwner->addPropertySubOwner(_renderEngine->screenSpaceOwner());
// The virtual property manager is not part of the rootProperty owner since it cannot
// have an identifier or the "regex as identifier" trick would not work
//_rootPropertyOwner->addPropertySubOwner(_virtualPropertyManager.get());
if (_windowWrapper) {
_rootPropertyOwner->addPropertySubOwner(_windowWrapper.get());
}
+5 -1
View File
@@ -28,8 +28,12 @@
namespace openspace {
// The VirtualPropertyManager cannot have an identifier (and thus cannot be part of
// another PropertyOwner) as otherwise the regex-as-name trick would no longer work. I
// don't particular like this implementation, but it's what we got for now; I'm open to
// replacing it with a better mechanism
VirtualPropertyManager::VirtualPropertyManager()
: properties::PropertyOwner({ "VirtualPropertyManager" })
: properties::PropertyOwner({ "" })
{}
void VirtualPropertyManager::addProperty(std::unique_ptr<properties::Property> prop) {