From ef81dc1831db37c104091b5f7edf8102c8d72270 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Wed, 9 Feb 2022 01:36:20 -0300 Subject: Remove code to update the layout direction of submenus from `PopupMenu` --- scene/gui/popup_menu.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'scene') diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 6e0f1c5198..b76bb230be 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -736,26 +736,7 @@ void PopupMenu::_notification(int p_what) { } } break; case NOTIFICATION_THEME_CHANGED: - case Control::NOTIFICATION_LAYOUT_DIRECTION_CHANGED: { - // Pass the layout direction to all submenus. - for (int i = 0; i < items.size(); i++) { - if (items[i].submenu.is_empty()) { - continue; - } - - Node *n = get_node(items[i].submenu); - if (!n) { - continue; - } - - PopupMenu *pm = Object::cast_to(n); - if (pm) { - pm->set_layout_direction(get_layout_direction()); - } - } - - [[fallthrough]]; - } + case Control::NOTIFICATION_LAYOUT_DIRECTION_CHANGED: case NOTIFICATION_TRANSLATION_CHANGED: { for (int i = 0; i < items.size(); i++) { items.write[i].xl_text = atr(items[i].text); -- cgit v1.2.3