Page MenuHomePhabricator

New (slot) method in QmitkDataStorageComboBox
Closed, ResolvedPublic

Description

I would like to have a new (slot) method SetSelectedNode(mitk::DataTreeNode::Pointer item) to afford a hand-off of selections from one combobox to others.
The hand-off only via ID is no satisfying solution, because the content of the comboboxes might differ.

Event Timeline

Document describing the solution to a feature request that needs core modification

Problem solved. Commit requires core modification

Two remarks:

  • SetSelectedNode() should be make a public slot method.
  • Please specify how the change can be tested (simple test program, manually executed, maybe Urte has already code with multiple DataStorageComboBoxes,...)

Document corresponding to T2438

(In reply to comment #4)

Two remarks:

  • SetSelectedNode() should be make a public slot method.
  • Please specify how the change can be tested (simple test program, manually

executed, maybe Urte has already code with multiple DataStorageComboBoxes,...)

done

Jochen is right about testing. Is there a way to manually test the behavior?
If so, you could describe the required "click sequence" shortly to allow others to test if this feature is working. If the feature cannot be tested yet, the request is fine, but it would be nice to enhance it as soon as a test is possible.

(In reply to comment #7)

Jochen is right about testing. Is there a way to manually test the behavior?
If so, you could describe the required "click sequence" shortly to allow others
to test if this feature is working. If the feature cannot be tested yet, the
request is fine, but it would be nice to enhance it as soon as a test is
possible.

In principle the method does nothing excited. One should just write some code that gets the selectednode from one datastoragecombobox and calls SetSelectedNode on another datastoragecombobox using this node as parameter. The method only makes some calls to the already exising Find method that searches for the node and gives back an index or -1 if it is not found. If -1 comes back the method gives a log message saying that it is not found and stops there. otherwise it calls the also already present setCurrentIndex method with this index. Urte asked for the method, so I presume she is going to use and test it extensively :)

Ok. Urte, when you use this feature could you please shortly describe how to test whether it works correctly?

Done. As said be Daniel, it has to be tested.