Skip to content

Commit 02adbc4

Browse files
committed
Do not set flags when PopupMenu::set_visible is called to hide popup.
1 parent 4ebf67c commit 02adbc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scene/gui/popup_menu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3247,7 +3247,7 @@ void PopupMenu::set_visible(bool p_visible) {
32473247
_native_popup(Rect2i(get_position(), get_size()));
32483248
}
32493249
} else {
3250-
if (is_inside_tree()) {
3250+
if (p_visible && is_inside_tree()) {
32513251
set_flag(FLAG_POPUP, true);
32523252
set_flag(FLAG_NO_FOCUS, !is_embedded());
32533253
}

0 commit comments

Comments
 (0)