Ticket #7910 (closed: fixed)
Drag file ability
Reported by: | Owen Arnold | Owned by: | Nick Draper |
---|---|---|---|
Priority: | major | Milestone: | Release 3.1 |
Component: | GUI | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Arturs Bekasovs |
Description
This issue was a suggestion by Emanuel. Reassign as appropriate after checking the validity of this issue.
We should be able to drag a file directly into the Workspace Panel and have it automatically processed by Load to generate a new workspace.
Change History
comment:2 Changed 7 years ago by Nick Draper
- Status changed from new to inprogress
re #7910 Added drag drop to workspace widget
Changeset: 931576c67fb2936a02c505e945f8660f08ae3125
comment:3 Changed 7 years ago by Nick Draper
re #7910 improve error handling
Changeset: d6d06a851eeaa44d40ecbb2a5d0ac5b34e925ea2
comment:4 Changed 7 years ago by Nick Draper
- Status changed from inprogress to verify
- Resolution set to fixed
To test:
This is probably more important to test on a non windows platform as it has to deal with file paths, and I'm happy windows is fine.
Please note this change is about drag and drop into the workspaces toolbox. The main are of mantidplot has some qtiplot drag and drop capability, but that is nothing to do with this ticket.
- Drag a loadable file into the workspaces toolbox - it should load - try from several locations, perhaps even a usb key or mounted network
- Drag a multiple selection of files into the workspaces toolbox
- Drag a non-loadable file (.jpg or something else) into the toolbox
- Drag a mixture of loadable and non loadable files
- Drag a non file selection into the toolbox (selection of text for example)
comment:5 Changed 7 years ago by Arturs Bekasovs
- Status changed from verify to verifying
- Tester set to Arturs Bekasovs
comment:6 Changed 7 years ago by Arturs Bekasovs
- Status changed from verifying to reopened
- Resolution fixed deleted
Testing done using Ubuntu 12.04.
Drag&drop of correct data files works perfectly fine. I can drag a single file or a list and everything gets loaded. Incorrect files are handled properly: when they are dragged on their own or within a list, errors are reported by loading algorithm and they don't get loaded.
However, there are a few (quite subtle) use cases, when unhandled exception is thrown:
- Dragging a URL from a browser. When dragging URL to e.g. a text editor, it gets opened as a file with contents of that URL, hence it seems that Mantid treats it as file, but couldn't load it.
- Dragging a file which you don't have read rights for. On Linux can be done using chmod -r <file> . Don't really know how to do the same on Windows.
- Dragging a file from SMB network-mapped location, e.g. Olympic. I guess, the problem is similar to the one with URLs, because filenames are of the form "smb://..." and should be handled specifically.
comment:7 Changed 7 years ago by Nick Draper
- Status changed from reopened to inprogress
re #7910 improve error handling
Changeset: 1586e8b6fe94d6690dfb2b9f7407b6a1f6b2fc98
comment:8 Changed 7 years ago by Nick Draper
- Status changed from inprogress to verify
- Resolution set to fixed
Resolved the first two failure conditions.
Possibly resolved the third as part of the changes for the other 2, but can't test on windows.
comment:10 Changed 7 years ago by Arturs Bekasovs
This seems to have solved all these problems. Error is thrown when file is not read-accessible, and nothing is happening when you try to drag URL or other esoteric location (like smb://), in the same way as nothing is reported when you try to drag a piece of text.
I've tested "proper" network mapped location (/archive) and it works OK.
Overall, very useful piece of functionality. :-)
comment:11 Changed 7 years ago by Arturs Bekasovs
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/7910_dragdrop_files'
Full changeset: 5a1da0e76a4d7ba0cf5c893217da98ccc25aecaf
comment:12 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 8755