Skip to content

Commit

Permalink
BUG: Fix removal of transforms when clicking on a subject hierarchy f…
Browse files Browse the repository at this point in the history
…older

When a subject hierarchy folder item was clicked that was associated with a non-transformable node then transform was removed from all child nodes.
  • Loading branch information
lassoan committed May 20, 2020
1 parent a18612b commit 62d4558
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,8 @@ void qMRMLSubjectHierarchyModel::updateSubjectHierarchyItemFromItemData(vtkIdTyp
// No action if the chosen transform is the same as the applied one
vtkMRMLTransformableNode* dataNode = vtkMRMLTransformableNode::SafeDownCast(
d->SubjectHierarchyNode->GetItemDataNode(shItemID) );
if (dataNode && dataNode->GetParentTransformNode() == newParentTransformNode)
vtkMRMLTransformNode* currentTransformNode = (dataNode ? dataNode->GetParentTransformNode() : nullptr);
if (currentTransformNode == newParentTransformNode)
{
return;
}
Expand Down

0 comments on commit 62d4558

Please sign in to comment.