Fix 'TabContainer' not updating its tab titles when locale is changed

This commit is contained in:
Michael Alexsander Silva Dias 2019-05-05 13:50:37 -03:00
parent 5128430700
commit a242bf464a
2 changed files with 9 additions and 3 deletions

View File

@ -146,6 +146,11 @@ void TabContainer::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_TRANSLATION_CHANGED: {
minimum_size_changed();
update();
} break;
case NOTIFICATION_RESIZED: { case NOTIFICATION_RESIZED: {
Vector<Control *> tabs = _get_tabs(); Vector<Control *> tabs = _get_tabs();
@ -181,7 +186,6 @@ void TabContainer::_notification(int p_what) {
first_tab_cache--; first_tab_cache--;
} }
} break; } break;
case NOTIFICATION_DRAW: { case NOTIFICATION_DRAW: {
RID canvas = get_canvas_item(); RID canvas = get_canvas_item();

View File

@ -222,6 +222,10 @@ void Tabs::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_TRANSLATION_CHANGED: {
minimum_size_changed();
update();
} break;
case NOTIFICATION_MOUSE_EXIT: { case NOTIFICATION_MOUSE_EXIT: {
rb_hover = -1; rb_hover = -1;
cb_hover = -1; cb_hover = -1;
@ -232,7 +236,6 @@ void Tabs::_notification(int p_what) {
_update_cache(); _update_cache();
_ensure_no_over_offset(); _ensure_no_over_offset();
ensure_tab_visible(current); ensure_tab_visible(current);
} break; } break;
case NOTIFICATION_DRAW: { case NOTIFICATION_DRAW: {
_update_cache(); _update_cache();
@ -394,7 +397,6 @@ void Tabs::_notification(int p_what) {
} else { } else {
buttons_visible = false; buttons_visible = false;
} }
} break; } break;
} }
} }