chore: clarified CompositeRule::_notification

This commit is contained in:
Sara Gerretsen 2026-04-01 15:03:20 +02:00
parent c20ef8bb85
commit 19b6a8e42a

View file

@ -119,8 +119,12 @@ void CompositeRule::_bind_methods() {
void CompositeRule::_notification(int what) {
switch (what) {
case NOTIFICATION_READY:
case NOTIFICATION_CHILD_ORDER_CHANGED:
if (!is_ready()) {
return;
}
// fall through
case NOTIFICATION_READY:
this->rules.clear();
for (Variant child : get_children()) {
if (Rule * rule{ cast_to<Rule>(child) }) {