Commit 98ac3bf5 authored by naucoin's avatar naucoin

BUG: don't add hierarchy nodes if the scene is importing/restoring. Issue #2849

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21562 3bd1e089-480b-0410-8dfb-8563597acbee
parent 959e9b16
......@@ -360,6 +360,15 @@ void vtkSlicerAnnotationModuleLogic::ProcessMRMLNodesEvents(vtkObject *caller,
void vtkSlicerAnnotationModuleLogic::OnMRMLSceneNodeAdded(vtkMRMLNode* node)
{
vtkDebugMacro("OnMRMLSceneNodeAddedEvent");
// don't respond if the scene is importing as the nodes will have hierarchy
// nodes already defined
if (this->GetMRMLScene() &&
(this->GetMRMLScene()->IsImporting() ||
this->GetMRMLScene()->IsRestoring()))
{
return;
}
vtkMRMLAnnotationNode * annotationNode = vtkMRMLAnnotationNode::SafeDownCast(
node);
if (!annotationNode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment