Changeset 25aa214 for src/World.hpp


Ignore:
Timestamp:
Dec 19, 2025, 11:29:38 PM (3 weeks ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.1, stable
Children:
98ad30
Parents:
d2be22
git-author:
Frederik Heber <frederik.heber@…> (11/16/25 11:19:01)
git-committer:
Frederik Heber <frederik.heber@…> (12/19/25 23:29:38)
Message:

FIX: fragmentation hydrogens do not trigger AtomInserted.

  • we had already switched off position and element changes. However, the fragmentation hydrogens could still be briefly seen on creation because the AtomInserted notification is still triggered. The World::createAtom allows now to suppress the notifcation. The switch options are put into an enum to make them very verbose in the code. This should really only be used by the HydrogenPool.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/World.hpp

    rd2be22 r25aa214  
    337337  void destroyMolecule(moleculeId_t);
    338338
     339  /** Enumeration of a notification boolean switch that makes it more readible.
     340   */
     341  enum CreateAtomNotificationType {
     342    NOTIFY_ON_CREATE_ATOM,  //!< default
     343    DO_NOT_NOTIFY           //!< this should only be used by the \a HydrogenPool for fragmentation hydrogens
     344  };
     345
    339346  /**
    340347   * Create a new atom. This method should be used whenever any atom is needed. Assigns a unique ID and stores
    341348   * the atom in the World. If the atom is not destroyed it will automatically be destroyed when the world ends.
    342    */
    343   atom *createAtom();
     349   *
     350   * \param _notify - if do not notify, then the AtomInserted channel receives no update, used by \a HydrogenPool.
     351   */
     352  atom *createAtom(const CreateAtomNotificationType _notify = NOTIFY_ON_CREATE_ATOM);
    344353
    345354  /**
Note: See TracChangeset for help on using the changeset viewer.