mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
TabBar current tab now stays -1 when adding first tab on deselect_enable
This commit is contained in:
parent
9b22b41531
commit
c6c7b508b6
2 changed files with 24 additions and 6 deletions
|
|
@ -1266,7 +1266,7 @@ void TabBar::add_tab(const String &p_str, const Ref<Texture2D> &p_icon) {
|
|||
queue_redraw();
|
||||
update_minimum_size();
|
||||
|
||||
if (tabs.size() == 1) {
|
||||
if (!deselect_enabled && tabs.size() == 1) {
|
||||
if (is_inside_tree()) {
|
||||
set_current_tab(0);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue