From e7e7aa7d1205038770ffe677422978d183a6a19f Mon Sep 17 00:00:00 2001 From: besh81 Date: Fri, 7 May 2021 13:01:27 +0200 Subject: Fixed bug in tab_container with hidden tabs Fix a bug that occour when there are hidden tabs in tab_container. The visualization isn't correct due to missing values in tab_widths array. --- scene/gui/tab_container.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index ff9dafa0f9..acf0641005 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -394,6 +394,7 @@ void TabContainer::_notification(int p_what) { Vector tab_widths; for (int i = first_tab_cache; i < tabs.size(); i++) { if (get_tab_hidden(i)) { + tab_widths.push_back(0); continue; } int tab_width = _get_tab_width(i); -- cgit v1.2.3