Ticket #10946 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Drag-drop peaks only

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: major Milestone: Release 3.4
Component: Diffraction Keywords:
Cc: roman.tolchenov@… Blocked By: #10939
Blocking: Tester: Roman Tolchenov

Description

Simple test. Run this. and note that we add the same peaks workspace twice

Load(Filename='CNCS_7860_event.nxs', OutputWorkspace='CNCS_7860_event', LoaderName='LoadEventNexus', LoaderVersion=1)
ConvertToDiffractionMDWorkspace(InputWorkspace='CNCS_7860_event', OutputWorkspace='trial', SplitThreshold=50, Extents='-1,1,-1,1,-1,1')

svw = plotSlice('trial')
sv = svw.getSlicer()

peaks=FindPeaksMD(InputWorkspace='trial', MaxPeaks=1)
peaks1 = FindPeaksMD(InputWorkspace='trial', MaxPeaks=2)
peaks2 = FindPeaksMD(InputWorkspace='trial', MaxPeaks=3)

sv.setPeaksWorkspaces([peaks, peaks1, peaks2])
sv.setPeaksWorkspace([peaks])

Now go through and hit 'Remove' against each peaks workspace in the SliceViewer. The PeaksViewer should close.

There are a couple of things here:

1) Roman has indicated that there is a spurious crash with the peaksoverlays when the button is used in conjunction with the drag-drop

2) We only want to drag-drop now anyway as this fits with the existing tools such as the instrument view

3) When you remove all peaksoverlay widgets, it should detach the peaksviewer. If this works then we are in a better place to disable the existing peaks overlay button. The reason that it currently does not work (one edge case) is that the compositepeakspresenter allows you to multiply add the same peaks workspace. This does not result in a new widget, but it does get tracked in the presenter code. We can fix this by properly determining if the incoming presenter is managing any workspaces that the composite currently knows about. If it is, then it should NOT be added.

For now, I'm going to leave the push button in place, but disable it. I want to check with users what they want to happen to this in the future. Ideally I'll remove it altogether.

Change History

comment:1 Changed 6 years ago by Owen Arnold

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Owen Arnold

  • Status changed from assigned to inprogress

refs #10946. Test and Fix issue.

We use the sets for each presenter to calculate the difference. If the difference between the peaks workspace is the same as the original set, then there is no overlap, and we may accept that presenter.

A number of unit tests have been introduced to verify this.

Changeset: dc17ec1a86d064814a85201037ce5c373fe9aa92

comment:3 Changed 6 years ago by Owen Arnold

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

This is being verified as pull request #138.

comment:4 Changed 6 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:5 Changed 6 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Merge pull request #138 from mantidproject/feature/10946_drag_drop_only

Drag-drop peaks only

Full changeset: 1d1d3f2ece5af540436785197783dcb4813f9b50

comment:6 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11785

Note: See TracTickets for help on using tickets.