1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-03 16:55:53 +00:00

Update rect after _pre_popup in popup_centered_*.

This commit is contained in:
Pāvels Nadtočajevs
2025-11-10 10:59:11 +02:00
parent 6fd949a6dc
commit adf18ff44d
10 changed files with 60 additions and 18 deletions

View File

@@ -3211,7 +3211,7 @@ String PopupMenu::_atr(int p_idx, const String &p_text) const {
ERR_FAIL_V_MSG(atr(p_text), "Unexpected auto translate mode: " + itos(items[p_idx].auto_translate_mode));
}
void PopupMenu::popup(const Rect2i &p_bounds) {
void PopupMenu::_popup_base(const Rect2i &p_bounds) {
bool native = global_menu.is_valid();
#ifdef TOOLS_ENABLED
if (is_part_of_edited_scene()) {
@@ -3230,7 +3230,7 @@ void PopupMenu::popup(const Rect2i &p_bounds) {
moved = Vector2();
popup_time_msec = OS::get_singleton()->get_ticks_msec();
Popup::popup(p_bounds);
Popup::_popup_base(p_bounds);
}
}