From c1e887edb81071cf2424affce7e06d92a5a74a7e Mon Sep 17 00:00:00 2001 From: besh81 Date: Fri, 7 May 2021 13:01:27 +0200 Subject: [PATCH] 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. (cherry picked from commit e7e7aa7d1205038770ffe677422978d183a6a19f) --- 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 9e5628fafe7..401a33ec3f3 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -323,6 +323,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);