1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-04 17:04:49 +00:00

Merge pull request #112604 from bruvzg/pop_center_rec

Update rect after `_pre_popup` in `popup_centered_*`.
This commit is contained in:
Thaddeus Crews
2025-11-25 09:52:38 -06:00
10 changed files with 60 additions and 18 deletions

View File

@@ -3329,7 +3329,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()) {
@@ -3348,7 +3348,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);
}
}