diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-30 19:08:14 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-30 19:08:14 +0100 |
commit | 4ff610dfaaba985a1364b497f8d81910ca24c55f (patch) | |
tree | b1965896cbb156682010347bb50d15af4a0b16db /scene/gui/control.cpp | |
parent | fa9d33ac2c9a61de2b3b1993d9cbc21b0100a60e (diff) | |
parent | b65a3a52accf9b415fff20c0c534e343a97c02a4 (diff) |
Merge pull request #69394 from KoBeWi/layin_layout
Display transform properties of contained controls
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r-- | scene/gui/control.cpp | 8 |
1 files 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<Container>(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"; |