From d1740e6cbf5f81ee1c3ec16256870856a1ca284b Mon Sep 17 00:00:00 2001 From: kleonc <9283098+kleonc@users.noreply.github.com> Date: Sun, 4 Aug 2024 11:59:37 +0200 Subject: [PATCH] Clear TabBar tab close button's rect after it's hidden --- scene/gui/tab_bar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scene/gui/tab_bar.cpp b/scene/gui/tab_bar.cpp index 1ae18f57289..3e0d6adf42b 100644 --- a/scene/gui/tab_bar.cpp +++ b/scene/gui/tab_bar.cpp @@ -620,6 +620,8 @@ void TabBar::_draw_tab(Ref &p_tab_style, Color &p_font_color, int p_in } cb->draw(ci, Point2i(cb_rect.position.x + style->get_margin(SIDE_LEFT), cb_rect.position.y + style->get_margin(SIDE_TOP))); + } else { + tabs.write[p_index].cb_rect = Rect2(); } }