No longer do recursive lookups of Dictionarys when keys have dots in them (closes #2302)

This commit is contained in:
Alexander Bock
2023-01-26 22:51:44 +01:00
parent 059842ecd4
commit b3fcfc75ec
3 changed files with 4 additions and 15 deletions

View File

@@ -256,15 +256,6 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary&
_meridianShift = p.meridianShift.value_or(_meridianShift);
addProperty(_meridianShift);
// @TODO (abock, 2021-03-26) Poking into the Geometry dictionary is not really
// optimal as we don't have local control over how the dictionary is checked. We
// should instead ask the geometry whether it has a radius or not
double radius = std::pow(10.0, 9.0);
if (dict.hasValue<double>(KeyRadius)) {
radius = dict.value<double>(KeyRadius);
}
setBoundingSphere(radius);
addPropertySubOwner(_projectionComponent);
_heightExaggeration.setExponent(3.f);
@@ -291,6 +282,7 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary&
else {
_radius = std::get<glm::vec3>(p.radius);
}
setBoundingSphere(glm::compMax(_radius.value()));
_radius.onChange([&]() { createSphere(); });
addProperty(_radius);