Construct Compound
This commit is contained in:
@@ -171,14 +171,16 @@ public abstract class BaseBond
|
||||
bond.StructureChanged();
|
||||
if (Atom.Compound.Atoms.Contains(bond.Atom))
|
||||
return;
|
||||
bond.Atom.HomogeneousMixture.Compounds.Remove(bond.Atom.Compound);
|
||||
bond.Atom.Compound.Amount = 0d;
|
||||
|
||||
Compound r = bond.Atom.Compound;
|
||||
foreach (BaseAtom atom in bond.Atom.Compound.Atoms.ToHashSet())
|
||||
{
|
||||
Atom.Compound.Atoms.Add(atom);
|
||||
atom.Compound = Atom.Compound;
|
||||
}
|
||||
|
||||
r.Amount = 0d;
|
||||
r.HomogeneousMixture.Compounds.Remove(r);
|
||||
}
|
||||
/// <summary>
|
||||
/// disconnect with connected bond
|
||||
|
||||
Reference in New Issue
Block a user