Skip to content
Snippets Groups Projects
Commit 39a2e117 authored by David C. Lonie's avatar David C. Lonie
Browse files

Overload graph copy methods in vtkMolecule.

The graph IO classes use these to create the final data object,
but they were leaving the bond list out-of-sync.
parent 07599a5d
No related branches found
No related tags found
No related merge requests found
......@@ -340,6 +340,21 @@ void vtkMolecule::DeepCopy(vtkDataObject *obj)
this->DeepCopyAttributes(m);
}
//----------------------------------------------------------------------------
bool vtkMolecule::CheckedShallowCopy(vtkGraph *g)
{
bool result = this->Superclass::CheckedShallowCopy(g);
this->BondListIsDirty = true;
return result;
}
//----------------------------------------------------------------------------
bool vtkMolecule::CheckedDeepCopy(vtkGraph *g)
{
bool result = this->Superclass::CheckedDeepCopy(g);
this->BondListIsDirty = true;
return result;
}
//----------------------------------------------------------------------------
void vtkMolecule::ShallowCopyStructure(vtkMolecule *m)
......
......@@ -184,6 +184,18 @@ public:
vtkGetObjectMacro(ElectronicData, vtkAbstractElectronicData);
virtual void SetElectronicData(vtkAbstractElectronicData*);
// Description:
// Performs the same operation as ShallowCopy(),
// but instead of reporting an error for an incompatible graph,
// returns false.
virtual bool CheckedShallowCopy(vtkGraph *g);
// Description:
// Performs the same operation as DeepCopy(),
// but instead of reporting an error for an incompatible graph,
// returns false.
virtual bool CheckedDeepCopy(vtkGraph *g);
// Description:
// Shallow copies the data object into this molecule.
virtual void ShallowCopy(vtkDataObject *obj);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment