You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Merge pull request #104342 from PhairZ/popup-bug
Fix blank popup menu on `EditorResourcePicker`
This commit is contained in:
@@ -183,6 +183,12 @@ void EditorResourcePicker::_resource_saved(Object *p_resource) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EditorResourcePicker::_update_menu() {
|
void EditorResourcePicker::_update_menu() {
|
||||||
|
if (edit_menu && edit_menu->is_visible()) {
|
||||||
|
edit_button->set_pressed(false);
|
||||||
|
edit_menu->hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_update_menu_items();
|
_update_menu_items();
|
||||||
|
|
||||||
Rect2 gt = edit_button->get_screen_rect();
|
Rect2 gt = edit_button->get_screen_rect();
|
||||||
@@ -549,6 +555,12 @@ void EditorResourcePicker::_button_input(const Ref<InputEvent> &p_event) {
|
|||||||
// a valid resource or the Picker is editable, as
|
// a valid resource or the Picker is editable, as
|
||||||
// there will otherwise be nothing to display.
|
// there will otherwise be nothing to display.
|
||||||
if (edited_resource.is_valid() || is_editable()) {
|
if (edited_resource.is_valid() || is_editable()) {
|
||||||
|
if (edit_menu && edit_menu->is_visible()) {
|
||||||
|
edit_button->set_pressed(false);
|
||||||
|
edit_menu->hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_update_menu_items();
|
_update_menu_items();
|
||||||
|
|
||||||
Vector2 pos = get_screen_position() + mb->get_position();
|
Vector2 pos = get_screen_position() + mb->get_position();
|
||||||
|
|||||||
Reference in New Issue
Block a user