Skip to content
Snippets Groups Projects
Commit 19b49efa authored by Marco Biasini's avatar Marco Biasini
Browse files

properly initialise AtomImpl properties

parent 08528947
No related merge requests found
......@@ -45,12 +45,16 @@ AtomImpl::AtomImpl(const EntityImplPtr& e,
res_(r),
name_(n),
pos_(p),
occupancy_(0.0),
b_factor_(1.0),
prop_(NULL),
is_hetatm_(false),
element_(ele),
is_hetatm_(false),
prim_connector_(),
connector_list_(),
fragment_(),
state_(0),
index_(index)
{
EntityHandle ent = this->GetEntity();
......@@ -206,6 +210,10 @@ void AtomImpl::UpdateFromXCS()
}
AtomImpl::~AtomImpl() {
if (prop_ && !prop_->is_default) {
delete prop_;
prop_=NULL;
}
}
EntityImplPtr AtomImpl::GetEntity() const
......
......@@ -227,9 +227,9 @@ private:
geom::Vec3 tf_pos_;
Real occupancy_;
Real b_factor_;
String element_;
AtomProp* prop_;
bool is_hetatm_;
String element_;
ConnectorImplP prim_connector_;
ConnectorImplList connector_list_;
FragmentImplP fragment_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment