diff --git a/modules/layered_tile_map/editor/layered_tile_set_atlas_source_editor.cpp b/modules/layered_tile_map/editor/layered_tile_set_atlas_source_editor.cpp index 906c98a73..1b9d3c667 100644 --- a/modules/layered_tile_map/editor/layered_tile_set_atlas_source_editor.cpp +++ b/modules/layered_tile_map/editor/layered_tile_set_atlas_source_editor.cpp @@ -1574,12 +1574,14 @@ void LayeredTileSetAtlasSourceEditor::_end_dragging() { // We have a tile. menu_option_coords = selected.tile; menu_option_alternative = 0; - base_tile_popup_menu->popup(Rect2i(get_global_transform().xform(get_local_mouse_position()), Size2i())); + base_tile_popup_menu->set_position(get_global_transform().xform(get_local_mouse_position())); + base_tile_popup_menu->popup(); } else if (hovered_base_tile_coords != LayeredTileSetSource::INVALID_ATLAS_COORDS) { // We don't have a tile, but can create one. menu_option_coords = hovered_base_tile_coords; menu_option_alternative = LayeredTileSetSource::INVALID_TILE_ALTERNATIVE; - empty_base_tile_popup_menu->popup(Rect2i(get_global_transform().xform(get_local_mouse_position()), Size2i())); + empty_base_tile_popup_menu->set_position(get_global_transform().xform(get_local_mouse_position())); + empty_base_tile_popup_menu->popup(); } } break; case DRAG_TYPE_RESIZE_TOP_LEFT: