Skip to content
Permalink
Browse files

BUG: Fix subject hierarchy programmatic reparenting

Fixes https://issues.slicer.org/view.php?id=4715

git-svn-id: http://svn.slicer.org/Slicer4/trunk@28583 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information...
cpinter
cpinter committed Nov 1, 2019
1 parent 5065bc7 commit bdd3c7621a3107959e2f8a3190a5e9aa980de842
Showing with 2 additions and 0 deletions.
  1. +2 −0 Modules/Loadable/SubjectHierarchy/Widgets/qMRMLSubjectHierarchyModel.cxx
@@ -290,6 +290,7 @@ void qMRMLSubjectHierarchyModel::setSubjectHierarchyNode(vtkMRMLSubjectHierarchy
shNode->AddObserver(vtkMRMLSubjectHierarchyNode::SubjectHierarchyItemAboutToBeRemovedEvent, d->CallBack, +10.0);
shNode->AddObserver(vtkMRMLSubjectHierarchyNode::SubjectHierarchyItemRemovedEvent, d->CallBack, -10.0);
shNode->AddObserver(vtkMRMLSubjectHierarchyNode::SubjectHierarchyItemModifiedEvent, d->CallBack, -10.0);
shNode->AddObserver(vtkMRMLSubjectHierarchyNode::SubjectHierarchyItemReparentedEvent, d->CallBack, -10.0);
}
}

@@ -1414,6 +1415,7 @@ void qMRMLSubjectHierarchyModel::onEvent(
sceneModel->onSubjectHierarchyItemRemoved(itemID);
break;
case vtkMRMLSubjectHierarchyNode::SubjectHierarchyItemModifiedEvent:
case vtkMRMLSubjectHierarchyNode::SubjectHierarchyItemReparentedEvent:
sceneModel->onSubjectHierarchyItemModified(itemID);
break;
case vtkMRMLScene::EndImportEvent:

0 comments on commit bdd3c76

Please sign in to comment.
You can’t perform that action at this time.