Ticket #7809 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

MantidTreeWidget reselection

Reported by: Owen Arnold Owned by: Federico M Pouzols
Priority: major Milestone: Release 3.3
Component: Framework Keywords:
Cc: roman.tolchenov@… Blocked By:
Blocking: Tester: John Hill

Description

For algorithms with Output or InputOutput workspace properties, execution causes the MantidTreeWidget in the MantidDock to recreate itself, and loose the last selected item.

We think that it would be better if the MantidTreeWidget at least attempted to try to reselect a workspace if it's the same name as the one selected prior to the update. Obviously, if the workspace is deleted or renamed, this would not be possible.

For information, the update mechanism proceeds via:

void MantidUI::handleReplaceWorkspace(Mantid::API::WorkspaceAfterReplaceNotification_ptr)
{
  emit ADS_updated();
}

which is triggered once the algorithm completes.

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

Bulk move to assigned at the introduction of the triage step

comment:2 Changed 6 years ago by Federico M Pouzols

  • Owner changed from Anyone to Federico M Pouzols

comment:3 Changed 6 years ago by Federico M Pouzols

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

I tried to reproduce the not-so-nice-to-the-user behavior described in the ticket but I couldn't. Selections (simple and/or multiple) are restored when the tree is updated/rebuilt.

I think this has been already fixed in this commit: https://github.com/mantidproject/mantid/commit/ec1ade8834fae7d1b1c00c24a3269df0abb4a0d8

To test: Load one or more workspaces, select one or more of them in the workspaces dock window. Run any algorithm with Output or InputOutput properties, for example you can type this in the python command line:

CreateWorkspace(OutputWorkspace='ws2',DataX='-1,-0.8,-0.6,-0.4,-0.2,-2.22045e-16,0.2,0.4,0.6,0.8,1',DataY='0,0,0,2,2,2,2,0,0,0',DataE='0,0,0,0,0,0,0,0,0,0',UnitX='1/q')
Rebin(InputWorkspace='ws2',OutputWorkspace='rhs_rebinned',Params='0.2')

The selection should not change. You can also try to directly remove workspaces from the python command line while having some workspaces selected:

DeleteWorkspace("ws2")

This also behaves correctly.

comment:4 Changed 6 years ago by Federico M Pouzols

  • Milestone changed from Backlog to Release 3.3

comment:5 Changed 6 years ago by John Hill

  • Status changed from verify to verifying
  • Tester set to John Hill

comment:6 Changed 6 years ago by John Hill

  • Status changed from verifying to closed

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8654

Note: See TracTickets for help on using tickets.