Page MenuHomePhabricator

Expanding items in QmitkDataManagerView::NodeTreeViewRowsAdded() not working
Closed, ResolvedPublic

Description

QmitkDataManagerView::NodeTreeViewRowsRemoved() is meant to "expand" the parent of a newly added item in Data Manager's tree view.

While the method is calling the QTreeView's correct method to do so, it provides the wrong QModelIndex. This index comes from the original model but is filtered through the m_FilterModel.

Consequently, indices should be converted via m_FilterModel. OR, simpler, we map the slot NodeTreeViewRowsRemoved to the corresponding signal of m_FilterModel. I implemented the second version.

Event Timeline

Correction: since the slot does some more than expanding the tree view (and I don't want to investigate that logic), I'll leave the original connection and just map the index.

User maleike has pushed new remote branch:

bug-19245-expand-new-nodes-in-datamanager

[99dbb0]: Merge branch 'bug-19245-expand-new-nodes-in-datamanager'

Merged commits:

2015-08-19 11:58:16 Daniel Maleike [f5fdee]
Map model index through filter model to expand correct item

Setting release_fix? flag. If you want to add it, this is a trivial change.