Do not set flags when PopupMenu::set_visible is called to hide popup.

This commit is contained in:
Pāvels Nadtočajevs
2025-08-28 13:16:16 +03:00
parent 4ebf67c12d
commit 02adbc47ba

View File

@@ -3247,7 +3247,7 @@ void PopupMenu::set_visible(bool p_visible) {
_native_popup(Rect2i(get_position(), get_size()));
}
} else {
if (is_inside_tree()) {
if (p_visible && is_inside_tree()) {
set_flag(FLAG_POPUP, true);
set_flag(FLAG_NO_FOCUS, !is_embedded());
}