Skip to content
Snippets Groups Projects
Commit f512513c authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH: AddVectorData Method always do notification, add a flag (set to true by...

ENH: AddVectorData Method always do notification, add a flag (set to true by default) to allow disabling it
parent 036edc7d
No related branches found
No related tags found
No related merge requests found
...@@ -251,16 +251,18 @@ void VectorDataModel::SetSelectedGeometry(int n) ...@@ -251,16 +251,18 @@ void VectorDataModel::SetSelectedGeometry(int n)
void void
VectorDataModel::AddVectorData( VectorDataPointer vData ) VectorDataModel::AddVectorData( VectorDataPointer vData, bool update)
{ {
this->EndGeometry(false); this->EndGeometry(false);
DataTreeType::Pointer tree = vData->GetDataTree(); DataTreeType::Pointer tree = vData->GetDataTree();
TreeNodeType * root = const_cast<TreeNodeType *>(tree->GetRoot()); TreeNodeType * root = const_cast<TreeNodeType *>(tree->GetRoot());
this->AddNode( root ); this->AddNode( root );
this->Update(); if (update)
{
this->Update();
}
} }
void void
VectorDataModel::AddNode( TreeNodeType * node ) VectorDataModel::AddNode( TreeNodeType * node )
{ {
......
...@@ -75,7 +75,7 @@ public: ...@@ -75,7 +75,7 @@ public:
itkGetObjectMacro(VectorData, VectorDataType); itkGetObjectMacro(VectorData, VectorDataType);
/** Load a vector data. */ /** Load a vector data. */
void AddVectorData( VectorDataPointer vData ); void AddVectorData( VectorDataPointer vData , bool update = true);
void AddNode( TreeNodeType * node ); void AddNode( TreeNodeType * node );
/** Add vertex to the vector data representation. /** Add vertex to the vector data representation.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment