Browse Source

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

Pāvels Nadtočajevs 2 weeks ago
parent
commit
02adbc47ba
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/gui/popup_menu.cpp

+ 1 - 1
scene/gui/popup_menu.cpp

@@ -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());
 		}