Make 'TabContainer' update when icon/title is changed

Fixes #28655.
This commit is contained in:
Michael Alexsander Silva Dias 2019-05-03 14:52:36 -03:00
parent c2251eab51
commit 37f4d51a75
1 changed files with 2 additions and 0 deletions

View File

@ -732,6 +732,7 @@ void TabContainer::set_tab_title(int p_tab, const String &p_title) {
Control *child = _get_tab(p_tab); Control *child = _get_tab(p_tab);
ERR_FAIL_COND(!child); ERR_FAIL_COND(!child);
child->set_meta("_tab_name", p_title); child->set_meta("_tab_name", p_title);
update();
} }
String TabContainer::get_tab_title(int p_tab) const { String TabContainer::get_tab_title(int p_tab) const {
@ -749,6 +750,7 @@ void TabContainer::set_tab_icon(int p_tab, const Ref<Texture> &p_icon) {
Control *child = _get_tab(p_tab); Control *child = _get_tab(p_tab);
ERR_FAIL_COND(!child); ERR_FAIL_COND(!child);
child->set_meta("_tab_icon", p_icon); child->set_meta("_tab_icon", p_icon);
update();
} }
Ref<Texture> TabContainer::get_tab_icon(int p_tab) const { Ref<Texture> TabContainer::get_tab_icon(int p_tab) const {