mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-18 02:49:03 -06:00
No longer do recursive lookups of Dictionarys when keys have dots in them (closes #2302)
This commit is contained in:
Submodule ext/ghoul updated: 61885c5684...2436bfd25a
@@ -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);
|
||||
|
||||
|
||||
@@ -58,13 +58,10 @@ LabelParser::LabelParser(std::string fileName, const ghoul::Dictionary& dictiona
|
||||
if (decoderStr == "Instrument") {
|
||||
// for each playbook call -> create a Decoder object
|
||||
for (std::string_view key : typeDict.keys()) {
|
||||
std::string currentKey = fmt::format("{}.{}", decoderStr, key);
|
||||
|
||||
if (!dictionary.hasValue<ghoul::Dictionary>(currentKey)) {
|
||||
if (!typeDict.hasValue<ghoul::Dictionary>(key)) {
|
||||
continue;
|
||||
}
|
||||
ghoul::Dictionary decoderDict =
|
||||
dictionary.value<ghoul::Dictionary>(currentKey);
|
||||
ghoul::Dictionary decoderDict = typeDict.value<ghoul::Dictionary>(key);
|
||||
|
||||
std::unique_ptr<Decoder> decoder = Decoder::createFromDictionary(
|
||||
decoderDict,
|
||||
|
||||
Reference in New Issue
Block a user