aboutsummaryrefslogtreecommitdiff
path: root/src/theme_builder/components/properties
diff options
context:
space:
mode:
Diffstat (limited to 'src/theme_builder/components/properties')
-rw-r--r--src/theme_builder/components/properties/OptionalPropertyEditor.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/theme_builder/components/properties/OptionalPropertyEditor.h b/src/theme_builder/components/properties/OptionalPropertyEditor.h
index 87ddcaa2..03eb759c 100644
--- a/src/theme_builder/components/properties/OptionalPropertyEditor.h
+++ b/src/theme_builder/components/properties/OptionalPropertyEditor.h
@@ -13,7 +13,7 @@ class OptionalPropertyEditor : public ui::components::Component {
OptionalPropertyEditor() {
container_.AddChild(&check_box_);
- container_.AddChild(editor_->GetRootControl());
+ container_.AddChild(editor_.GetRootControl());
editor_.ChangeEvent()->AddHandler([this](std::nullptr_t) {
if (IsEnabled()) {
@@ -34,7 +34,8 @@ class OptionalPropertyEditor : public ui::components::Component {
}
std::optional<PropertyType> GetValue() const {
- return IsEnabled() ? editor_.GetValue() : std::nullopt;
+ return IsEnabled() ? std::optional<PropertyType>(editor_.GetValue())
+ : std::nullopt;
}
void SetValue(std::optional<PropertyType> value, bool trigger_change = true) {