Cleanup lambda expressions and directly address Fadeable properties when adding properties

This commit is contained in:
Alexander Bock
2023-04-12 23:20:53 +02:00
parent 19642e8120
commit 7565a91196
67 changed files with 229 additions and 212 deletions

View File

@@ -95,13 +95,13 @@ RenderableConstellationsBase::RenderableConstellationsBase(
{
const Parameters p = codegen::bake<Parameters>(dictionary);
addProperty(_opacity);
addProperty(Fadeable::_opacity);
// Avoid reading files here, instead do it in multithreaded initialize()
if (p.namesFile.has_value()) {
_namesFilename = absPath(p.namesFile.value().string()).string();
}
_namesFilename.onChange([&]() { loadConstellationFile(); });
_namesFilename.onChange([this]() { loadConstellationFile(); });
addProperty(_namesFilename);
_lineWidth = p.lineWidth.value_or(_lineWidth);