summaryrefslogtreecommitdiff
path: root/editor/property_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/property_editor.cpp')
-rw-r--r--editor/property_editor.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 771d34d841..9f13a9d520 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -831,11 +831,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
// get default color picker mode from editor settings
int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
- if (default_color_mode == 1) {
- color_picker->set_hsv_mode(true);
- } else if (default_color_mode == 2) {
- color_picker->set_raw_mode(true);
- }
+ color_picker->set_color_mode((ColorPicker::ColorModeType)default_color_mode);
int picker_shape = EDITOR_GET("interface/inspector/default_color_picker_shape");
color_picker->set_picker_shape((ColorPicker::PickerShapeType)picker_shape);
@@ -1474,7 +1470,7 @@ void CustomPropertyEditor::_modified(String p_string) {
v = value_editor[0]->get_text().to_int();
return;
} else {
- v = expr->execute(Array(), nullptr, false);
+ v = expr->execute(Array(), nullptr, false, false);
}
if (v != prev_v) {
@@ -1650,7 +1646,7 @@ real_t CustomPropertyEditor::_parse_real_expression(String text) {
if (err != OK) {
out = value_editor[0]->get_text().to_float();
} else {
- out = expr->execute(Array(), nullptr, false);
+ out = expr->execute(Array(), nullptr, false, true);
}
return out;
}