Restore the ability to drag and drop images into the editor (#31009)
`ImageItem`'s `file` is returning `""` as its `path` for single-filed worktrees like the ones are created for the images dropped from the OS. `ImageItem::load_image_metadata` had used that `path` in FS operations and the other method tried to use for icon resolving. Rework the code to use a more specific, `worktree::File` instead and always use the `abs_path` when dealing with paths from this `file`. Release Notes: - Fixed images not opening on drag and drop into the editor
This commit is contained in:
parent
944a0df436
commit
e4262f97af
5 changed files with 39 additions and 33 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -7946,6 +7946,7 @@ dependencies = [
|
|||
"editor",
|
||||
"file_icons",
|
||||
"gpui",
|
||||
"language",
|
||||
"log",
|
||||
"project",
|
||||
"schemars",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue