File Browser Deletes Unselected Files #34467

Closed
opened 2013-02-28 03:08:27 +01:00 by Harley Acheson · 12 comments
Member

%%%--- Operating System, Graphics card ---

Windows 7 64-bit. 32-bit Blender build
ATI Radeon HD 5570

- Blender version with error

Blender 2.66 Revision 54822

- Short description of error ---

File Browser editor deletes file under mouse, not selected files

- Steps for others to reproduce the error (preferably based on attached .blend file) ---

I put 9 text files in a test folder.
In Text Editor, Text / Open Text Block
Browse to test folder that contains the text files
Select the first text file
Shift-click to select a few more files (but not all)

While these files are selected, move your mouse pointer over a file that is not selected
Press "delete" key and you will get the "OK? Delete" operator confirmation
Confirm and see that the file deleted was the one under the mouse pointer, not the ones that were selected.
%%%

%%%--- Operating System, Graphics card --- Windows 7 64-bit. 32-bit Blender build ATI Radeon HD 5570 - Blender version with error Blender 2.66 Revision 54822 - Short description of error --- File Browser editor deletes file under mouse, not selected files - Steps for others to reproduce the error (preferably based on attached .blend file) --- I put 9 text files in a test folder. In Text Editor, Text / Open Text Block Browse to test folder that contains the text files Select the first text file Shift-click to select a few more files (but not all) While these files are selected, move your mouse pointer over a file that is not selected Press "delete" key and you will get the "OK? Delete" operator confirmation Confirm and see that the file deleted was the one under the mouse pointer, not the ones that were selected. %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%I can confirm this.

the op deletes the active (highlited) file. Not the selected. I agree this being a little unintuitive. But this goes way back to 2.49 (and I guess much further). I am not sure if this should be changed?

At least the operator description is misleading ("Delete selected file"). It should read "Delete active file" imo.

I have attached a patch that renames the operator description and also brings back the message we had in 2.49 [which tells you which file will actually be deleted].

If there is interest in changing the behaviour to not delete the active but all selected files instead I will be glad to look into this as well

Greetz
Philipp

%%%

%%%I can confirm this. the op deletes the _active_ (highlited) file. Not the selected. I agree this being a little unintuitive. But this goes way back to 2.49 (and I guess much further). I am not sure if this should be changed? At least the operator description is misleading ("Delete selected file"). It should read "Delete active file" imo. I have attached a patch that renames the operator description and also brings back the message we had in 2.49 [which tells you which file will actually be deleted]. If there is interest in changing the behaviour to _not_ delete the active but all selected files instead I will be glad to look into this as well Greetz Philipp %%%
Author
Member

%%%But I would argue that it is not deleting the "active" file either. If this were to follow our usual use of active/selected then deleting "selected" would delete all I have selected, while deleting "active" would delete the last selected item. In this case we seem to doing a pre-selection highlight and then working on that instead of what the user has actually selected.

%%%

%%%But I would argue that it is not deleting the "active" file either. If this were to follow our usual use of active/selected then deleting "selected" would delete all I have selected, while deleting "active" would delete the last selected item. In this case we seem to doing a pre-selection highlight and then working on that *instead* of what the user has actually selected. %%%
Author
Member

%%%My take on fixing this...

If the usual behavior is desired then I would keep it, but only when nothing is selected. So if NOTHING is selected then pressing the "delete" key should target the file under the mouse, but give an operator confirmation that names the file.

However, if anything is actually selected then use that list instead. The operator confirmation should say something like "Delete the selected file(s)" and all the selected files should be deleted.

I have attached an image, "FileManagerDelete.png" that shows what the current behavior looks like.%%%

%%%My take on fixing this... If the usual behavior is desired then I would keep it, but only when nothing is selected. So if *NOTHING* is selected then pressing the "delete" key should target the file under the mouse, but give an operator confirmation that names the file. However, if anything is actually selected then use that list instead. The operator confirmation should say something like "Delete the selected file(s)" and all the selected files should be deleted. I have attached an image, "FileManagerDelete.png" that shows what the current behavior looks like.%%%
Member

%%%I'll be taking a look. I agree that the current behaviour is a bit confusing - I will probably go with changing the operator to act on the selected files, I think that would be the expected user behaviour.
Expect commit in the next days...
%%%

%%%I'll be taking a look. I agree that the current behaviour is a bit confusing - I will probably go with changing the operator to act on the selected files, I think that would be the expected user behaviour. Expect commit in the next days... %%%
Author
Member

%%%Thanks Andrea,

A user noticed (and I confirmed) that these deletions don't go to the Windows Recycle Bin or to the Mac Trash, so they are not so easily recovered.

It would be nice to have per-OS file deletion routines in Ghost. So calling SHFileOperationW for Windows, FSMoveObjectToTrashSync for Mac, and moving to ~/.Trash on Linux.

Cheers, Harley
%%%

%%%Thanks Andrea, A user noticed (and I confirmed) that these deletions don't go to the Windows Recycle Bin or to the Mac Trash, so they are not so easily recovered. It would be nice to have per-OS file deletion routines in Ghost. So calling SHFileOperationW for Windows, FSMoveObjectToTrashSync for Mac, and moving to ~/.Trash on Linux. Cheers, Harley %%%

%%%Note, it would be worth considering to remove this functionality, Gnome/GTK on linux dont have the ability to manipulate files and I found it works quite nice.

Basically file selectors in GTK are non destructive (with the exception of directory creation) so you cant have any accidents,
I would prefer this - then allowing to delete file selections which could backfire.%%%

%%%Note, it would be worth considering to remove this functionality, Gnome/GTK on linux dont have the ability to manipulate files and I found it works quite nice. Basically file selectors in GTK are non destructive (with the exception of directory creation) so you cant have any accidents, I would prefer this - then allowing to delete file selections which could backfire.%%%
Author
Member

%%%Personally, I have never deleted a file from within the File Browser editor. I just found the functionality by accident and then saw the strange selection behavior. So for me it could be removed without me really noticing...

But to remove it because it is easy to delete files by accident seems like a weak reason. Although it is easy to do this one destructive thing (deleting) it is just as easy to do something equally as destructive: overwriting an existing file, and I don't think anyone would remove that functionality. In fact, I would even argue that deletions within the app, where you can view file contents, is safer that forcing the user to do so outside the app where that is not possible.

And if we were to follow my previous comment above (using Windows Recycle Bin, Mac Trash, and Linux ~/,Trash) then this deletion operation would actually be much less destructive than overwriting existing files. With that in place I would even add a "delete" button to the UI.%%%

%%%Personally, I have never deleted a file from within the File Browser editor. I just found the functionality by accident and then saw the strange selection behavior. So for me it could be removed without me really noticing... But to remove it because it is easy to delete files by accident seems like a weak reason. Although it is easy to do this one destructive thing (deleting) it is just as easy to do something equally as destructive: overwriting an existing file, and I don't think anyone would remove that functionality. In fact, I would even argue that deletions within the app, where you can view file contents, is safer that forcing the user to do so outside the app where that is not possible. And if we were to follow my previous comment above (using Windows Recycle Bin, Mac Trash, and Linux ~/,Trash) then this deletion operation would actually be much less destructive than overwriting existing files. With that in place I would even add a "delete" button to the UI.%%%

%%%@Harley, better supporting OS delete as you suggest is fine to add in the sense if we support this feature we may as well support it properly.

Just prefer to stop our file selector from becoming a file manager, even through historically - this has been the case.

  • You could even move files between dirtectories in 2.4x using it as a split-screen file manager :)

On Linux most apps I use can't delete files in their file selector and I have to say I don't really miss it from the days I used windows where it was possible.%%%

%%%@Harley, better supporting OS delete as you suggest is fine to add in the sense if we support this feature we may as well support it properly. Just prefer to stop our file selector from becoming a file manager, even through historically - this has been the case. - You could even move files between dirtectories in 2.4x using it as a split-screen file manager :) On Linux most apps I use can't delete files in their file selector and I have to say I don't really miss it from the days I used windows where it was possible.%%%
Author
Member

%%%It is just so hard to remove features once they are in. Although I've never used it, and you don't really like it, I'm sure there are still enough people that do that there would be large hue and cry and gnashing of teeth if it were removed.%%%

%%%It is just so hard to remove features once they are in. Although I've never used it, and you don't really like it, I'm sure there are still enough people that do that there would be large hue and cry and gnashing of teeth if it were removed.%%%
Member

%%%Fixed in revision 55556. The file delete operator now acts on selected files.
Closing issue.
(I will try to incorporate some of the suggested changes about the Trash bin once we have a better structure in the area of handling OS dependencies)%%%

%%%Fixed in revision 55556. The file delete operator now acts on selected files. Closing issue. (I will try to incorporate some of the suggested changes about the Trash bin once we have a better structure in the area of handling OS dependencies)%%%
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#34467
No description provided.