Ticket #10846 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

PeaksViewer observes workspace changes

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: major Milestone: Release 3.4
Component: Diffraction Keywords:
Cc: Blocked By:
Blocking: #10650, #10652, #10849, #10856 Tester: Roman Tolchenov

Description

The PeaksViewer in the SliceViewer should respond to peaks workspace changes under the hood via the workspaceobservers.

Without closing and reopening the PeaksViewer, the PeaksViewer should be able to respond to:

  • Changes to PeaksWorkspaces currently being visualised in the event that the name of that workspace stays the same, but the object is different
  • In-place changes to the workspace, the memory location being unchanged, but possibly having a different name in the ADS.

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 #10846. Observes notfications

Changeset: 2ef91f775f7d0838e6f73ec74aa4cbfdd90839f5

comment:3 Changed 6 years ago by Owen Arnold

refs #10846. Extend test suites

New tests to cover this changed functionality.

Changeset: 499fe804261e59c85f7355afe7179fc455563c16

comment:4 Changed 6 years ago by Owen Arnold

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

This is being verified as pull request #117.

comment:5 Changed 6 years ago by Owen Arnold

refs #10846. Removal listening

Added the functionality to automatically stop managing peaks workspaces that are removed in the ADS. This is done slightly differently from the update functionality because we already have the gui commands for removing the peaks workspaces via buttons in the PeaksViewer. Therefore the notifications go down through the PeaksViewer rather than up through the CompositePeaksPresenter, as in the case for the updates.

Changeset: 575d26d92d52a0899b5b2fbb6e97104c9612bf40

comment:6 Changed 6 years ago by Owen Arnold

refs #10846. clang format.

Changeset: 28e9de76a068c5d294f599de364576dccca2919d

comment:7 Changed 6 years ago by Owen Arnold

test this please

comment:8 Changed 6 years ago by Owen Arnold

refs #10846. Fix warnings.

Changeset: 5b9b4355315fa86548093c5f94b86a9125e8762b

comment:9 Changed 6 years ago by Owen Arnold

test this please

comment:10 Changed 6 years ago by Owen Arnold

test this please

comment:11 Changed 6 years ago by Owen Arnold

Don't merge this to master yet. This is a 3.4 issue.

comment:12 Changed 6 years ago by Owen Arnold

  • Blocking 10650 added

(In #10650) Blocked by #10846 because some major changes where made in that ticket.

comment:13 Changed 6 years ago by Owen Arnold

  • Blocking 10849 added

comment:14 Changed 6 years ago by Owen Arnold

refs #10846. Fixes for update behaviour.

1) Fix issue whereby FindPeaksInRegion was being run after each peak removal. With no peaks left, the code in ConcretPeaksPresenter was trying to establish the radius of the peak (based on the first peak) and sefaulting.

2) When the peaks workspace was being changed, the table was not updating immediately. This is because the model of the MVC table needs to be marked as modified in order to trigger repainting of the QTableView.

Changeset: a47ef30522c68240dea004e1ac35da260c695772

comment:15 Changed 6 years ago by Owen Arnold

refs #10846. Deleting unmanaged peaks workspaces.

Another issue fixed here. If we have a peaks workspace that is not being displayed, and we delete it, it should not bother the PeaksViewer. Was segfaulting previously.

Changeset: f53bc1ba7a23d483e699bc5390d2eb8cf8d58b15

comment:16 Changed 6 years ago by Owen Arnold

refs #10846. Further update issue fix.

According to the documentation you shouldn't replace the model of a QTableView, so instead I'm replacing the workspace on the model.

Changeset: b8ba123f8c2a598564ae4959039f1997a07b96a8

comment:17 Changed 6 years ago by Owen Arnold

  • Blocking 10856 added

comment:18 Changed 6 years ago by Owen Arnold

test this please

comment:19 Changed 6 years ago by Owen Arnold

test this please

comment:20 Changed 6 years ago by Roman Tolchenov

MantidPlot crashes after performing a sequence of operations on a displayed peaks workspace:

  1. Run a script from the usage examples to create workspaces:
    LoadEventNexus(Filename=r'TOPAZ_3132_event.nxs',OutputWorkspace='TOPAZ_3132_nxs')
    ConvertToDiffractionMDWorkspace(InputWorkspace='TOPAZ_3132_nxs',OutputWorkspace='TOPAZ_3132_md',LorentzCorrection='1')
    FindPeaksMD(InputWorkspace='TOPAZ_3132_md',PeakDistanceThreshold='0.15',MaxPeaks='100',OutputWorkspace='peaks')
    FindUBUsingFFT(PeaksWorkspace='peaks',MinD='2',MaxD='16')
    
  1. Open TOPAZ_3132_md workspace in SliceViewer.
  2. Overlay peaks workspace 'peaks'.
  3. Rename 'peaks' to 'peaks1'.
  4. Clone 'peaks1' to 'clone'.
  5. Rename 'clone' back to 'peaks1'.
  6. MantidPlot crashes when you try to interact with the SliceViewer.

comment:21 Changed 6 years ago by Owen Arnold

refs #10846. Fix clone/rename bug.

Changeset: e445e48eaf6ea2f90a364647ca6a6bcba7f6f06f

comment:22 Changed 6 years ago by Roman Tolchenov

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

comment:23 Changed 6 years ago by Roman Tolchenov

I don't understand how the change fixed it but I don't see the crash any more.

comment:24 Changed 6 years ago by Owen Arnold

  • Status changed from verifying to closed

Merge branch 'master' into feature/10846_notifications_peaks_viewer

Full changeset: 9d1d4c694631732cd9fdc5e179ade27f404d80ff

comment:25 Changed 6 years ago by Roman Tolchenov

Merge pull request #117 from mantidproject/feature/10846_notifications_peaks_viewer

Feature/10846 notifications peaks viewer

Full changeset: 0a18ef56abf43a967113edf95e60f5db47cd5861

comment:26 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11688

Note: See TracTickets for help on using tickets.