diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-08 14:28:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-08 14:28:39 +0100 |
commit | 45fa14e1ae2740cef7c9396e671c0754191c7117 (patch) | |
tree | b41712161244dc6987eb2e61989ef43448679fd6 /scene/gui/tab_container.cpp | |
parent | f470979732513436124c01a465b22f948637b5fa (diff) | |
parent | c0381594c35885c3cb8aa595e72518fe4fc47b41 (diff) |
Merge pull request #58850 from YeldhamDev/more_tab_regressions
Diffstat (limited to 'scene/gui/tab_container.cpp')
-rw-r--r-- | scene/gui/tab_container.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 6e1f506e58..ee61c862b7 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -635,14 +635,13 @@ void TabContainer::set_tab_title(int p_tab, const String &p_title) { Control *child = get_tab_control(p_tab); ERR_FAIL_COND(!child); - if (p_title.is_empty()) { - tab_bar->set_tab_title(p_tab, String(child->get_name())); + tab_bar->set_tab_title(p_tab, p_title); + if (p_title == child->get_name()) { if (child->has_meta("_tab_name")) { child->remove_meta("_tab_name"); } } else { - tab_bar->set_tab_title(p_tab, p_title); child->set_meta("_tab_name", p_title); } |