Skip to content

Commit c81aa6e

Browse files
committed
Merge pull request #95122 from kleonc/tab_bar_clear_close_button_rect
Clear `TabBar` tab close button's rect after it's hidden
2 parents 79ae952 + d1740e6 commit c81aa6e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scene/gui/tab_bar.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,8 @@ void TabBar::_draw_tab(Ref<StyleBox> &p_tab_style, Color &p_font_color, int p_in
620620
}
621621

622622
cb->draw(ci, Point2i(cb_rect.position.x + style->get_margin(SIDE_LEFT), cb_rect.position.y + style->get_margin(SIDE_TOP)));
623+
} else {
624+
tabs.write[p_index].cb_rect = Rect2();
623625
}
624626
}
625627

0 commit comments

Comments
 (0)