From b65a3a52accf9b415fff20c0c534e343a97c02a4 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 30 Nov 2022 15:08:39 +0100 Subject: Display transform properties of contained controls --- scene/gui/control.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 5ce17abf18..e90a6a69ab 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -485,10 +485,10 @@ void Control::_validate_property(PropertyInfo &p_property) const { } } else if (Object::cast_to(parent_node)) { // If the parent is a container, display only container-related properties. - if (p_property.name.begins_with("anchor_") || p_property.name.begins_with("offset_") || p_property.name.begins_with("grow_") || p_property.name == "anchors_preset" || - p_property.name == "position" || p_property.name == "rotation" || p_property.name == "scale" || p_property.name == "size" || p_property.name == "pivot_offset") { - p_property.usage ^= PROPERTY_USAGE_EDITOR; - + if (p_property.name.begins_with("anchor_") || p_property.name.begins_with("offset_") || p_property.name.begins_with("grow_") || p_property.name == "anchors_preset") { + p_property.usage ^= PROPERTY_USAGE_DEFAULT; + } else if (p_property.name == "position" || p_property.name == "rotation" || p_property.name == "scale" || p_property.name == "size" || p_property.name == "pivot_offset") { + p_property.usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_READ_ONLY; } else if (p_property.name == "layout_mode") { // Set the layout mode to be disabled with the proper value. p_property.hint_string = "Position,Anchors,Container,Uncontrolled"; -- cgit v1.2.3