Explorar o código

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

Pāvels Nadtočajevs hai 2 semanas
pai
achega
02adbc47ba
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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());
 		}