mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
No need to use the .set method of properties directly
This commit is contained in:
@@ -69,6 +69,11 @@ public:
|
||||
*/
|
||||
void set(std::any value) override;
|
||||
|
||||
/**
|
||||
* Triggers this TriggerProperty.
|
||||
*/
|
||||
void trigger();
|
||||
|
||||
std::string jsonValue() const override;
|
||||
};
|
||||
|
||||
|
||||
@@ -526,7 +526,7 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
|
||||
|
||||
if (p.blendingOption.has_value()) {
|
||||
const std::string blendingOpt = *p.blendingOption;
|
||||
_blendingFuncOption.set(BlendingMapping[blendingOpt]);
|
||||
_blendingFuncOption = BlendingMapping[blendingOpt];
|
||||
}
|
||||
|
||||
_originalRenderBin = renderBin();
|
||||
|
||||
@@ -82,7 +82,7 @@ ScreenSpaceFramebuffer::ScreenSpaceFramebuffer(const ghoul::Dictionary& dictiona
|
||||
|
||||
glm::vec2 resolution = global::windowDelegate->currentDrawBufferResolution();
|
||||
addProperty(_size);
|
||||
_size.set(glm::vec4(0.f, 0.f, resolution.x, resolution.y));
|
||||
_size = glm::vec4(0.f, 0.f, resolution.x, resolution.y);
|
||||
}
|
||||
|
||||
ScreenSpaceFramebuffer::~ScreenSpaceFramebuffer() {}
|
||||
|
||||
@@ -238,7 +238,7 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary
|
||||
_renderOption.addOption(1, "Camera Position Normal");
|
||||
_renderOption.addOption(2, "Screen center Position Normal");
|
||||
addProperty(_renderOption);
|
||||
//_renderOption.set(1);
|
||||
//_renderOption = 1;
|
||||
|
||||
if (p.unit.has_value()) {
|
||||
_unit = codegen::map<DistanceUnit>(*p.unit);
|
||||
|
||||
@@ -163,7 +163,7 @@ ServerInterface::ServerInterface(const ghoul::Dictionary& config)
|
||||
for (std::string_view k : dict.keys()) {
|
||||
v.push_back(dict.value<std::string>(k));
|
||||
}
|
||||
list.set(v);
|
||||
list = v;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ void Browser::updateBrowserSize() {
|
||||
}
|
||||
|
||||
void Browser::reload() {
|
||||
_reload.set(true);
|
||||
_reload.trigger();
|
||||
}
|
||||
|
||||
void Browser::setRatio(float ratio) {
|
||||
|
||||
@@ -91,7 +91,7 @@ HorizonsTranslation::HorizonsTranslation(const ghoul::Dictionary& dictionary)
|
||||
|
||||
std::vector<std::string> files;
|
||||
files.push_back(file);
|
||||
_horizonsTextFiles.set(files);
|
||||
_horizonsTextFiles = files;
|
||||
}
|
||||
else if (std::holds_alternative<std::vector<std::string>>(p.horizonsTextFile)) {
|
||||
std::vector<std::string> files =
|
||||
|
||||
@@ -387,7 +387,7 @@ SpoutReceiverPropertyProxy::SpoutReceiverPropertyProxy(properties::PropertyOwner
|
||||
});
|
||||
owner.addProperty(_updateSelection);
|
||||
|
||||
_updateSelection.set(0);
|
||||
_updateSelection.trigger();
|
||||
}
|
||||
|
||||
SpoutReceiverPropertyProxy::~SpoutReceiverPropertyProxy() {}
|
||||
|
||||
@@ -1089,8 +1089,8 @@ void OrbitalNavigator::setFocusNode(const SceneGraphNode* focusNode,
|
||||
}
|
||||
|
||||
void OrbitalNavigator::setFocusNode(const std::string& focusNode, bool) {
|
||||
_anchor.set(focusNode);
|
||||
_aim.set(std::string(""));
|
||||
_anchor = focusNode;
|
||||
_aim = std::string("");
|
||||
}
|
||||
|
||||
void OrbitalNavigator::setAnchorNode(const SceneGraphNode* anchorNode,
|
||||
@@ -1128,11 +1128,11 @@ void OrbitalNavigator::setAimNode(const SceneGraphNode* aimNode) {
|
||||
}
|
||||
|
||||
void OrbitalNavigator::setAnchorNode(const std::string& anchorNode) {
|
||||
_anchor.set(anchorNode);
|
||||
_anchor = anchorNode;
|
||||
}
|
||||
|
||||
void OrbitalNavigator::setAimNode(const std::string& aimNode) {
|
||||
_aim.set(aimNode);
|
||||
_aim = aimNode;
|
||||
}
|
||||
|
||||
void OrbitalNavigator::updatePreviousAnchorState() {
|
||||
|
||||
@@ -42,6 +42,10 @@ void TriggerProperty::set(std::any) {
|
||||
notifyChangeListeners();
|
||||
}
|
||||
|
||||
void TriggerProperty::trigger() {
|
||||
notifyChangeListeners();
|
||||
}
|
||||
|
||||
std::string TriggerProperty::jsonValue() const {
|
||||
return "true";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user