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 e7e7aa7d12)
This commit is contained in:
besh81 2021-05-07 13:01:27 +02:00 committed by Rémi Verschelde
parent b47cd82f76
commit c1e887edb8
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -323,6 +323,7 @@ void TabContainer::_notification(int p_what) {
Vector<int> tab_widths; Vector<int> tab_widths;
for (int i = first_tab_cache; i < tabs.size(); i++) { for (int i = first_tab_cache; i < tabs.size(); i++) {
if (get_tab_hidden(i)) { if (get_tab_hidden(i)) {
tab_widths.push_back(0);
continue; continue;
} }
int tab_width = _get_tab_width(i); int tab_width = _get_tab_width(i);