|
@@ -1326,7 +1326,7 @@ void EditorPropertyInteger::_value_changed(int64_t val) {
|
|
}
|
|
}
|
|
|
|
|
|
void EditorPropertyInteger::update_property() {
|
|
void EditorPropertyInteger::update_property() {
|
|
- int64_t val = get_edited_property_value();
|
|
|
|
|
|
+ int64_t val = get_edited_property_display_value();
|
|
spin->set_value_no_signal(val);
|
|
spin->set_value_no_signal(val);
|
|
#ifdef DEBUG_ENABLED
|
|
#ifdef DEBUG_ENABLED
|
|
// If spin (currently EditorSplinSlider : Range) is changed so that it can use int64_t, then the below warning wouldn't be a problem.
|
|
// If spin (currently EditorSplinSlider : Range) is changed so that it can use int64_t, then the below warning wouldn't be a problem.
|
|
@@ -2635,7 +2635,7 @@ void EditorPropertyColor::_notification(int p_what) {
|
|
}
|
|
}
|
|
|
|
|
|
void EditorPropertyColor::update_property() {
|
|
void EditorPropertyColor::update_property() {
|
|
- picker->set_pick_color(get_edited_property_value());
|
|
|
|
|
|
+ picker->set_pick_color(get_edited_property_display_value());
|
|
const Color color = picker->get_pick_color();
|
|
const Color color = picker->get_pick_color();
|
|
|
|
|
|
// Add a tooltip to display each channel's values without having to click the ColorPickerButton
|
|
// Add a tooltip to display each channel's values without having to click the ColorPickerButton
|
|
@@ -3015,7 +3015,7 @@ void EditorPropertyResource::_resource_selected(const Ref<Resource> &p_resource,
|
|
bool unfold = !get_edited_object()->editor_is_section_unfolded(get_edited_property());
|
|
bool unfold = !get_edited_object()->editor_is_section_unfolded(get_edited_property());
|
|
get_edited_object()->editor_set_section_unfold(get_edited_property(), unfold);
|
|
get_edited_object()->editor_set_section_unfold(get_edited_property(), unfold);
|
|
update_property();
|
|
update_property();
|
|
- } else {
|
|
|
|
|
|
+ } else if (!is_checkable() || is_checked()) {
|
|
emit_signal(SNAME("resource_selected"), get_edited_property(), p_resource);
|
|
emit_signal(SNAME("resource_selected"), get_edited_property(), p_resource);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3276,7 +3276,7 @@ void EditorPropertyResource::setup(Object *p_object, const String &p_path, const
|
|
}
|
|
}
|
|
|
|
|
|
void EditorPropertyResource::update_property() {
|
|
void EditorPropertyResource::update_property() {
|
|
- Ref<Resource> res = get_edited_property_value();
|
|
|
|
|
|
+ Ref<Resource> res = get_edited_property_display_value();
|
|
|
|
|
|
if (use_sub_inspector) {
|
|
if (use_sub_inspector) {
|
|
if (res.is_valid() != resource_picker->is_toggle_mode()) {
|
|
if (res.is_valid() != resource_picker->is_toggle_mode()) {
|
|
@@ -3328,6 +3328,8 @@ void EditorPropertyResource::update_property() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ sub_inspector->set_read_only(is_checkable() && !is_checked());
|
|
|
|
+
|
|
if (res.ptr() != sub_inspector->get_edited_object()) {
|
|
if (res.ptr() != sub_inspector->get_edited_object()) {
|
|
sub_inspector->edit(res.ptr());
|
|
sub_inspector->edit(res.ptr());
|
|
_update_property_bg();
|
|
_update_property_bg();
|