Fix regressions with nameless and icon-only tabs
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user