Merge pull request #28656 from YeldhamDev/tabcontainer_icon_title_update

Make 'TabContainer' update when icon/title is changed
This commit is contained in:
Michael Alexsander Silva Dias 2019-05-03 16:07:19 -03:00 committed by GitHub
commit a5dfb3ae5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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