Ticket #8978 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Extend the drag and drop support of some classes

Reported by: Gesner Passos Owned by: Nick Draper
Priority: major Milestone: Release 3.2
Component: GUI Keywords:
Cc: peter.parker@…, anders.markvardsen@… Blocked By:
Blocking: Tester: Samuel Jackson

Description

MWRunFiles, WorkspaceSelector, DataSelector

Attachments

add_drag_func.patch (6.9 KB) - added by Gesner Passos 7 years ago.
Adds the drop functionality of those classes.

Change History

Changed 7 years ago by Gesner Passos

Adds the drop functionality of those classes.

comment:1 Changed 7 years ago by Gesner Passos

A quick and dirty implementation of the following features:

MWRunFiles: drop functionality for any string or local file (does not accept the pattern a = mtda?)

WorkspaceSelector: drop functionality for the pattern: a = mtda? (allow selecting the workspace by dragging it from the workspace window.

DataSelector: Mixture of both. If you drop a local file, it switches to MWRunFiles if it is a workspace, it changes to the workspaceselector.

The code must be improved and documented.

comment:2 Changed 7 years ago by Gesner Passos

  • Owner changed from Gesner Passos to Nick Draper

I'm giving this to Nick to let him decide if these features should enter or not. I would also like if he could find someone to do what is necessary to improve what is proposed in the patch.

comment:3 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

Bulk move of tickets out of triage (new) to assigned at the introduction of the triage state

comment:4 Changed 7 years ago by Gesner Passos

  • Cc peter.parker@…, anders.markvardsen@… added

comment:5 Changed 7 years ago by Nick Draper

  • Status changed from assigned to inprogress

Add drag drop to mantid QT Widgets

This adds drag drop functionality to all instances of

  • MWRunfiles
  • WorkspaceSelector
  • DataSelector

This will be on by default for all instances of the widgets, but can be disabled by calling

widget->acceptsDrops(false)

MWRunFiles will accept dropped files, and text, but NOT workspaces

WorkspaceSelector will select dropped workspaces if that selection is valid for the control

DataSelector will change to the MWRunfiles or WorkspaceSelector based on the drop and act as the control above

To Test:

  1. Open up mantidplot, load a workspace or two, and have some external files ready
  2. Open the SANS ISIS interface and into one of the 6 input file boxes try dropping workspaces(should not work) or files, or text from outside mantidplot (should work)
  3. Open ConvertToEnergy, select IRIS and process a couple of IRIS files from autodata (just load the file and hit process.
  4. Open Indirect DataAnalysis and go to the Fury tab
  5. Click on the file dopdown and select workspace you should have entries for the reduced workspaces you have just created.
  6. Have fun dropping owkrspaces or external files

re #8978

Changeset: 56466fe80f9b9b252c585536cd993294ffb061b9

comment:6 Changed 7 years ago by Nick Draper

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:7 Changed 7 years ago by Peter Parker

  • Status changed from verify to reopened
  • Resolution fixed deleted

We've accidentally added Code/add_drag_func.patch to the repo.

comment:8 Changed 7 years ago by Nick Draper

oops

comment:9 Changed 7 years ago by Nick Draper

  • Status changed from reopened to inprogress

removed unintended patch file from the branch

re #8978

Changeset: 2413d24de5b1cf6556791c9c46563904d5c9a596

comment:10 Changed 7 years ago by Nick Draper

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:11 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:12 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to verify
  • Tester Russell Taylor deleted

Probably better tested by someone who's more familiar with all these ISIS interfaces. I just wanted to check it did no damage to Step Scan and DGS Reduction interfaces, which use MWRunFiles.

comment:13 Changed 7 years ago by Samuel Jackson

  • Status changed from verify to verifying
  • Tester set to Samuel Jackson

comment:14 Changed 7 years ago by Samuel Jackson

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8978_Extend_dragdrop'

Full changeset: 56043365bb607cd8a4ef2b3388c06bb5d99c877e

comment:15 Changed 7 years ago by Samuel Jackson

Tested it on all the widgets listed and it seems to work fine.

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9821

Note: See TracTickets for help on using tickets.