Skip to content

Commit

Permalink
Merge pull request godotengine#28709 from YeldhamDev/tabcontainer_loc…
Browse files Browse the repository at this point in the history
…ale_update

Fix 'TabContainer' not updating its tab titles when locale is changed
  • Loading branch information
akien-mga authored May 6, 2019
2 parents 563d4b0 + a242bf4 commit 7b7a664
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion scene/gui/tab_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ void TabContainer::_notification(int p_what) {

switch (p_what) {

case NOTIFICATION_TRANSLATION_CHANGED: {

minimum_size_changed();
update();
} break;
case NOTIFICATION_RESIZED: {

Vector<Control *> tabs = _get_tabs();
Expand Down Expand Up @@ -181,7 +186,6 @@ void TabContainer::_notification(int p_what) {
first_tab_cache--;
}
} break;

case NOTIFICATION_DRAW: {

RID canvas = get_canvas_item();
Expand Down
6 changes: 4 additions & 2 deletions scene/gui/tabs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ void Tabs::_notification(int p_what) {

switch (p_what) {

case NOTIFICATION_TRANSLATION_CHANGED: {
minimum_size_changed();
update();
} break;
case NOTIFICATION_MOUSE_EXIT: {
rb_hover = -1;
cb_hover = -1;
Expand All @@ -232,7 +236,6 @@ void Tabs::_notification(int p_what) {
_update_cache();
_ensure_no_over_offset();
ensure_tab_visible(current);

} break;
case NOTIFICATION_DRAW: {
_update_cache();
Expand Down Expand Up @@ -394,7 +397,6 @@ void Tabs::_notification(int p_what) {
} else {
buttons_visible = false;
}

} break;
}
}
Expand Down

0 comments on commit 7b7a664

Please sign in to comment.