summaryrefslogtreecommitdiff
path: root/scene/gui/popup_menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/popup_menu.cpp')
-rw-r--r--scene/gui/popup_menu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 2e854abb76..e67b54eaf9 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -216,7 +216,7 @@ void PopupMenu::_activate_submenu(int p_over) {
submenu_pos.x = this_pos.x + submenu_size.width;
}
- if (submenu_pos.x + submenu_size.width > get_parent_rect().size.width) {
+ if (submenu_pos.x + submenu_size.width > get_parent_rect().position.x + get_parent_rect().size.width) {
submenu_pos.x = this_pos.x - submenu_size.width;
}