summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMounir Tohami <53877170+WhalesState@users.noreply.github.com>2024-06-01 15:49:43 +0000
committerMounir Tohami <53877170+WhalesState@users.noreply.github.com>2024-06-01 15:49:43 +0000
commit62a58c55388da3ad1340cfdf7d08925315b08da3 (patch)
tree6347b69b98b0b53d8954abf26e1e6c31f42d56f5
parent705b7a0b0bd535c95e4e8fb439f3d84b3fb4f427 (diff)
downloadredot-engine-62a58c55388da3ad1340cfdf7d08925315b08da3.tar.gz
Fix `NOTIFICATION_SORT_CHILDREN` is called twice on startup
-rw-r--r--scene/gui/container.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index f1faf3e899..c824200ffc 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -177,13 +177,9 @@ Vector<int> Container::get_allowed_size_flags_vertical() const {
void Container::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_ENTER_TREE: {
- pending_sort = false;
- queue_sort();
- } break;
-
case NOTIFICATION_RESIZED:
- case NOTIFICATION_THEME_CHANGED: {
+ case NOTIFICATION_THEME_CHANGED:
+ case NOTIFICATION_ENTER_TREE: {
queue_sort();
} break;