Ignore:
Timestamp:
Apr 23, 2021, 8:51:43 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
f01bb3
Parents:
e70818
git-author:
Frederik Heber <frederik.heber@…> (11/17/20 22:25:47)
git-committer:
Frederik Heber <frederik.heber@…> (04/23/21 20:51:43)
Message:

BondAddAction also adds to molecule.

  • NOTE: This basically does nothing as new atoms (AddAtom action) always get a dummy molecule. However, removing them from the dummy molecule and readding one is quite complicated.
  • if we add bonds between new atoms (without a molecule set) to and atoms belonging all to the same molecule, then we automatically add the new atoms to this molecule as well. This saves the need for any GraphUpdateMolecules() call afterwards.
  • also implemented undo and redo for this.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/BondAction/BondAddAction.def

    re70818 rc30959  
    1212
    1313typedef std::vector<std::pair<atomId_t,atomId_t> > bondPairIds_t;
     14typedef std::vector<const molecule*> molecules_t;
    1415
    1516#include "Parameters/Validators/RangeValidator.hpp"
     
    2728(RangeValidator<int>(1,10))
    2829
    29 #define statetypes (bondPairIds_t)
    30 #define statereferences (bondPairIds)
     30#define statetypes (bondPairIds_t)(molecules_t)(molecule *)
     31#define statereferences (bondPairIds)(molecules)(add_to_mol)
    3132
    3233// some defines for all the names, you may use ACTION, STATE and PARAMS
Note: See TracChangeset for help on using the changeset viewer.