mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
fix blank popup menu on EditorResourcePicker
This commit is contained in:
parent
fdbf6ecc9f
commit
c0d0531459
1 changed files with 12 additions and 0 deletions
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue