From edb250930d743f8fb2ca5bc11add0df9f48b6453 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 20 Oct 2023 16:56:18 +0200 Subject: [PATCH] Small improvement to the CSplitCointainer. --- scene/gui/split_container.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp index e40a5dcd9..f1468753e 100644 --- a/scene/gui/split_container.cpp +++ b/scene/gui/split_container.cpp @@ -65,9 +65,11 @@ void SplitContainer::_set_vertical(bool p_vertical) { vertical = p_vertical; - should_clamp_split_offset = true; - queue_sort(); - minimum_size_changed(); + if (is_inside_tree()) { + should_clamp_split_offset = true; + _resort(); + minimum_size_changed(); + } } String SplitContainer::get_grabber_theme_constant_name() const {