Page MenuHomePhabricator

Fiber Extraction view is not cleaning up properly when nodes are deleted
Closed, WontfixPublic

Description

There are several places, where the FiberExtractionView is not removing its contents properly when a node is deleted ( either directly or by closing the whole project )

(1) Suspicious creation:

  • if we have a single fiber datanode in the storage and remove it, the OnSelectionChanged() method will currently re-create ( store a member ) the node to be deleted. this happens on Line 829: if (m_SelectedFB.empty()) {...} In case of node deletion, the first part of the method ( for loop over the retrieved nodes) does nothing, but inside the if block, the View is getting all nodes from the DataManager, which includes the node currently selected to be deleted.

    => this leads to a situation, that the PlanarFigure buttons are active even though there are no nodes in the DS

    (2) Statistics cleanup:
  • the ComputeStatistics() method does not reset the text in case the m_SelectedFB vector is empty, i.e. on deletion of the previously loaded fiber node

Event Timeline

User hering has pushed new remote branch:

bug-17184-fiber-extraction-view-cleanup

There is still a problem with the 'Close Project' event. When the focus is on the MultiWidget and not the View, there is no notification about SelectionChanged.

Solution ( by Sascha ): listen to node deletion evens from data storage, similar work already done in QmitkMeasurementView by Daniel Knorr.

@Peter: I do not know, what the intention was with this re-creation of the nodes if the selection has none ( see Comment #1). Could you please check the changes? We have performed just simple testing.

New solution proposal:

  • do not call the OnSelectionChanged from the NodeRemoved
  • remove the affected nodes from the m_SelectedPF and FB member variables

This reacts to both node deletion and project closing. Tested with multiple fiber bundles and multiple PFs and it works.

New remote branch follows.

User hering has pushed new remote branch:

bug-17184-fiber-extraction-node-cleaning

Setting target milestone to unspecified as nothing happened for some months. It seems that the bug is fixed but not merged. Consider merging soon after the upcoming release.

kislinsk claimed this task.
This task was automatically closed because it wasn't updated at least since July 2016 (over 2 years). Please re-open this task if you think that it is still relevant. This most probably means that you will resolve it.