mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Fixes to comments on pull request
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
#ifndef __OPENSPACE_CORE___OPENSPACEENGINE___H__
|
||||
#define __OPENSPACE_CORE___OPENSPACEENGINE___H__
|
||||
|
||||
#include <openspace/properties/optionproperty.h>
|
||||
#include <openspace/properties/propertyowner.h>
|
||||
#include <openspace/properties/property.h>
|
||||
#include <openspace/properties/optionproperty.h>
|
||||
#include <openspace/properties/stringproperty.h>
|
||||
#include <openspace/properties/scalar/boolproperty.h>
|
||||
#include <openspace/scene/profile.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if(os.getenv("OPENSPACE_DEVELOPER"))
|
||||
if os.getenv("OPENSPACE_DEVELOPER")
|
||||
then
|
||||
openspace.setPropertyValueSingle('OpenSpaceEngine.Visibility', 4)
|
||||
end
|
||||
openspace.setPropertyValueSingle('OpenSpaceEngine.PropertyVisibility', 4)
|
||||
end
|
||||
|
||||
@@ -126,8 +126,8 @@ namespace {
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo VisibilityInfo = {
|
||||
"Visibility",
|
||||
"Visibility",
|
||||
"PropertyVisibility",
|
||||
"Property Visibility",
|
||||
"Hides or displays different settings in the GUI depending on how advanced they "
|
||||
"are."
|
||||
};
|
||||
@@ -169,10 +169,12 @@ OpenSpaceEngine::OpenSpaceEngine()
|
||||
|
||||
using Visibility = openspace::properties::Property::Visibility;
|
||||
_visibility.addOptions({
|
||||
{ static_cast<int>(Visibility::User), "User"},
|
||||
{ static_cast<int>(Visibility::Developer), "Developer"},
|
||||
{ static_cast<int>(Visibility::Hidden), "Everything"},
|
||||
});
|
||||
{ static_cast<int>(Visibility::NoviceUser), "Novice User"},
|
||||
{ static_cast<int>(Visibility::User), "User"},
|
||||
{ static_cast<int>(Visibility::AdvancedUser), "Advanced User"},
|
||||
{ static_cast<int>(Visibility::Developer), "Developer"},
|
||||
{ static_cast<int>(Visibility::Hidden), "Everything"},
|
||||
});
|
||||
}
|
||||
|
||||
OpenSpaceEngine::~OpenSpaceEngine() {} // NOLINT
|
||||
|
||||
@@ -112,11 +112,10 @@ void OptionProperty::setValue(int value) {
|
||||
}
|
||||
|
||||
bool OptionProperty::hasOption() const {
|
||||
int setValue = value();
|
||||
auto it = std::find_if(
|
||||
_options.begin(),
|
||||
_options.end(),
|
||||
[setValue](const Option& option) {
|
||||
[setValue = value()](const Option& option) {
|
||||
return option.value == setValue;
|
||||
}
|
||||
);
|
||||
@@ -125,11 +124,10 @@ bool OptionProperty::hasOption() const {
|
||||
|
||||
|
||||
const OptionProperty::Option& OptionProperty::option() const {
|
||||
int setValue = value();
|
||||
auto it = std::find_if(
|
||||
_options.begin(),
|
||||
_options.end(),
|
||||
[setValue](const Option& option) {
|
||||
[setValue = value()](const Option& option) {
|
||||
return option.value == setValue;
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user