1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Only add warning label for Layout group in Control category

This commit is contained in:
Haoyu Qiu
2024-04-27 21:56:24 +08:00
parent 6118592c6d
commit bd716a693a
2 changed files with 11 additions and 0 deletions

View File

@@ -413,7 +413,15 @@ bool EditorInspectorPluginControl::can_handle(Object *p_object) {
return Object::cast_to<Control>(p_object) != nullptr;
}
void EditorInspectorPluginControl::parse_category(Object *p_object, const String &p_category) {
inside_control_category = p_category == "Control";
}
void EditorInspectorPluginControl::parse_group(Object *p_object, const String &p_group) {
if (!inside_control_category) {
return;
}
Control *control = Object::cast_to<Control>(p_object);
if (!control || p_group != "Layout") {
return;