Commit 0620a622 authored by David C. Lonie's avatar David C. Lonie
Browse files

Clean up vtkMolecule::Initialize().

parent aab10efa
Pipeline #23485 passed with stage
...@@ -33,10 +33,8 @@ vtkStandardNewMacro(vtkMolecule); ...@@ -33,10 +33,8 @@ vtkStandardNewMacro(vtkMolecule);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
vtkMolecule::vtkMolecule() vtkMolecule::vtkMolecule()
: ElectronicData(NULL)
{ {
vtkPoints *points = vtkPoints::New();
this->SetPoints(points);
points->Delete();
this->Initialize(); this->Initialize();
} }
...@@ -57,7 +55,9 @@ void vtkMolecule::Initialize() ...@@ -57,7 +55,9 @@ void vtkMolecule::Initialize()
vertData->SetScalars(atomicNums.GetPointer()); vertData->SetScalars(atomicNums.GetPointer());
// Nuclear coordinates // Nuclear coordinates
this->Points->Initialize(); vtkPoints *points = vtkPoints::New();
this->SetPoints(points);
points->Delete();
// Setup edge data // Setup edge data
vtkDataSetAttributes *edgeData = this->GetEdgeData(); vtkDataSetAttributes *edgeData = this->GetEdgeData();
...@@ -71,7 +71,7 @@ void vtkMolecule::Initialize() ...@@ -71,7 +71,7 @@ void vtkMolecule::Initialize()
this->UpdateBondList(); this->UpdateBondList();
// Electronic data // Electronic data
this->ElectronicData = NULL; this->SetElectronicData(NULL);
this->Modified(); this->Modified();
} }
......
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