Changeset 009e2e2 for src


Ignore:
Timestamp:
Aug 5, 2015, 5:32:07 PM (9 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
3e52834
Parents:
534374
git-author:
Frederik Heber <heber@…> (06/21/15 04:46:32)
git-committer:
Frederik Heber <heber@…> (08/05/15 17:32:07)
Message:

GLMoleculeObject_bond uses ObservedValue for internally representing atom's state.

Location:
src/UIElements/Views/Qt4/Qt3D
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp

    r534374 r009e2e2  
    5757#include "World.hpp"
    5858
    59 GLMoleculeObject_bond::GLMoleculeObject_bond(QGLSceneNode *mesh[], QObject *parent, const bond::ptr bondref, const enum SideOfBond side) :
     59
     60// static entities
     61const Observable::channels_t
     62GLMoleculeObject_bond::BondPositionChannels(1, AtomObservable::PositionChanged);
     63const Observable::channels_t
     64GLMoleculeObject_bond::BondDegreeChannels(1, BondObservable::DegreeChanged);
     65const Observable::channels_t
     66GLMoleculeObject_bond::BondElementChannels(1, AtomObservable::ElementChanged);
     67
     68GLMoleculeObject_bond::GLMoleculeObject_bond(
     69    QGLSceneNode *mesh[],
     70    QObject *parent,
     71    const bondIds_t bondIds,
     72    const enum SideOfBond side) :
    6073  GLMoleculeObject(mesh, parent),
    6174  Observer(std::string("GLMoleculeObject_bond")
    62       +toString(bondref->leftatom->getId())
     75      +toString(bondIds.first)
    6376      +std::string("-")
    64       +toString(bondref->rightatom->getId())),
    65   _bond(*bondref),
    66   leftobservable(bondref->leftatom),
    67   rightobservable(bondref->rightatom),
    68   leftatomId(bondref->leftatom->getId()),
    69   rightatomId(bondref->rightatom->getId()),
     77      +toString(bondIds.second)),
     78  leftatomId(bondIds.first),
     79  rightatomId(bondIds.second),
     80  leftatomref(getAtom(leftatomId)),
     81  rightatomref(getAtom(rightatomId)),
     82  bondref(*leftatomref->getBond(rightatomref)),
    7083  BondSide(side),
     84  leftPosition(
     85      leftatomref,
     86      boost::bind(&GLMoleculeObject_bond::updateLeftPosition, this),
     87      "BondleftPosition_"+toString(leftatomId),
     88      updateLeftPosition(),
     89      BondPositionChannels),
     90  rightPosition(
     91      rightatomref,
     92      boost::bind(&GLMoleculeObject_bond::updateRightPosition, this),
     93      "BondrightPosition_"+toString(rightatomId),
     94      updateRightPosition(),
     95      BondPositionChannels),
     96  leftElement(
     97      leftatomref,
     98      boost::bind(&GLMoleculeObject_bond::updateLeftElement, this),
     99      "BondleftElement"+toString(leftatomId),
     100      updateLeftElement(),
     101      BondElementChannels),
     102  rightElement(
     103      rightatomref,
     104      boost::bind(&GLMoleculeObject_bond::updateRightElement, this),
     105      "BondrightElement"+toString(rightatomId),
     106      updateRightElement(),
     107      BondElementChannels),
     108  Degree(
     109      &bondref,
     110      boost::bind(&GLMoleculeObject_bond::updateDegree, this),
     111      "BondDegree"+toString(leftatomId)+"_"+toString(rightatomId),
     112      updateDegree(),
     113      BondDegreeChannels),
    71114  leftobservable_enabled(false),
    72   rightobservable_enabled(false),
    73   bond_enabled(false)
     115  rightobservable_enabled(false)
    74116{
    75117  // sign on as observer (obtain non-const instance before)
    76   _bond.signOn(this);
    77   _bond.signOn(this, BondObservable::BondRemoved);
    78   _bond.signOn(this, BondObservable::DegreeChanged);
     118  bondref.signOn(this, BondObservable::BondRemoved);
     119  bondref.signOn(this, BondObservable::DegreeChanged);
    79120  bond_enabled = true;
    80   leftobservable->signOn(this);
    81   leftobservable->signOn(this, AtomObservable::PositionChanged);
    82   leftobservable->signOn(this, AtomObservable::ElementChanged);
     121  leftatomref->signOn(this, AtomObservable::PositionChanged);
     122  leftatomref->signOn(this, AtomObservable::ElementChanged);
    83123  leftobservable_enabled = true;
    84   rightobservable->signOn(this);
    85   rightobservable->signOn(this, AtomObservable::PositionChanged);
    86   rightobservable->signOn(this, AtomObservable::ElementChanged);
     124  rightatomref->signOn(this, AtomObservable::PositionChanged);
     125  rightatomref->signOn(this, AtomObservable::ElementChanged);
    87126  rightobservable_enabled = true;
    88127
    89   size_t elementno = 0;
    90   switch (BondSide) {
    91     case left:
    92     {
    93       const atom * const _rightatom = const_cast<const World &>(World::getInstance()).
    94           getAtom(AtomById(rightatomId));
    95       if (_rightatom->getType() != NULL) {
    96         elementno = _rightatom->getType()->getAtomicNumber();
    97       } else { // if not element yet set, set to hydrogen
    98         elementno = 1;
    99       }
    100       break;
    101     }
    102     case right:
    103     {
    104       const atom * const _leftatom = const_cast<const World &>(World::getInstance()).
    105           getAtom(AtomById(leftatomId));
    106       if (_leftatom->getType() != NULL) {
    107         elementno = _leftatom->getType()->getAtomicNumber();
    108       } else { // if not element yet set, set to hydrogen
    109         elementno = 1;
    110       }
    111 
    112       break;
    113     }
    114     default:
    115       ASSERT(0,
    116           "GLMoleculeObject_bond::GLMoleculeObject_bond() - side is not a valid argument: "+toString(BondSide)+".");
    117       break;
    118   }
    119 
    120   QGLMaterial *elementmaterial = getMaterial(elementno);
    121   setMaterial(elementmaterial);
    122 
     128  resetElement();
    123129  resetPosition();
    124130  resetWidth();
     131
     132  connect(this, SIGNAL(elementChanged()), this, SLOT(resetElement()), Qt::QueuedConnection);
     133  connect(this, SIGNAL(positionChanged()), this, SLOT(resetPosition()), Qt::QueuedConnection);
     134  connect(this, SIGNAL(degreeChanged()), this, SLOT(resetWidth()), Qt::QueuedConnection);
    125135}
    126136
    127137GLMoleculeObject_bond::~GLMoleculeObject_bond()
    128138{
    129   LOG(3, "DEBUG: Destroying  GLMoleculeObject_bond to bond " << &_bond << " and side " << BondSide << ".");
     139  LOG(3, "DEBUG: Destroying  GLMoleculeObject_bond to bond [" <<
     140      leftatomId << "," << rightatomId << "] and side " << BondSide << ".");
    130141  // signOff() if not already done
    131142  removeLeftAtom();
    132143  removeRightAtom();
    133   removeBond();
    134144  removeChannels();
    135145}
     
    163173    }
    164174  }
    165 }
    166 
    167 void GLMoleculeObject_bond::removeBond()
    168 {
    169   if (bond_enabled)
    170     _bond.signOff(this);
    171175}
    172176
     
    198202  }
    199203  if (bond_enabled) {
    200     _bond.signOff(this, BondObservable::BondRemoved);
    201     _bond.signOff(this, BondObservable::DegreeChanged);
     204    const atom * const _leftatom = const_cast<const World &>(World::getInstance()).
     205        getAtom(AtomById(leftatomId));
     206    const atom * const _rightatom = const_cast<const World &>(World::getInstance()).
     207        getAtom(AtomById(rightatomId));
     208    if ((_leftatom != NULL) && (_rightatom != NULL)) {
     209      bond::ptr _bond = _leftatom->getBond(_rightatom);
     210      if (_bond != NULL) {
     211        _bond->signOff(this, BondObservable::BondRemoved);
     212        _bond->signOff(this, BondObservable::DegreeChanged);
     213      }
     214    }
    202215    bond_enabled = false;
    203216  }
    204217}
    205 
    206218
    207219void GLMoleculeObject_bond::removeMe()
     
    217229    default:
    218230      ASSERT(0,
    219           "GLMoleculeObject_bond::subjectKilled() - side is not a valid argument: "
     231          "GLMoleculeObject_bond::removeMe() - side is not a valid argument: "
    220232          +toString(BondSide)+".");
    221233      break;
     
    225237void GLMoleculeObject_bond::update(Observable *publisher)
    226238{
    227 #ifdef LOG_OBSERVER
    228   if (publisher == static_cast<const Observable *>(&_bond)) {
    229     observerLog().addMessage() << "++ Update of Observer "
    230         << observerLog().getName(static_cast<Observer*>(this))
    231         << " from bond.";
    232   } else if (publisher == leftobservable) {
    233     observerLog().addMessage() << "++ Update of Observer "
    234         << observerLog().getName(static_cast<Observer*>(this))
    235         << " from leftatom " << leftatomId << ".";
    236   } else if (publisher == rightobservable) {
    237     observerLog().addMessage() << "++ Update of Observer " <<
    238         observerLog().getName(static_cast<Observer*>(this))
    239         << " from rightatom " << rightatomId << ".";
    240   } else
    241     observerLog().addMessage() << "++ Update of Observer " <<
    242     observerLog().getName(static_cast<Observer*>(this)) << " from unknown source.";
    243 #endif
     239  ASSERT(0, "GLMoleculeObject_bond::update() - we are not signed on for any global updates.");
    244240}
    245241
     
    248244  // assume subjectKilled() is from Observable's own subjectKilled(), not notifications
    249245  // but we must always signOff from all other sources!
    250   if (publisher == static_cast<const Observable *>(&_bond)) {
     246  if (publisher == static_cast<const Observable*>(&bondref)) {
    251247#ifdef LOG_OBSERVER
    252248    observerLog().addMessage() << "++ subjectKilled of Observer "
     
    256252    removeLeftAtom();
    257253    removeRightAtom();
    258   } else if (publisher == leftobservable) {
     254  } else if (publisher == static_cast<const Observable*>(leftatomref)) {
    259255#ifdef LOG_OBSERVER
    260256    observerLog().addMessage() << "++ subjectKilled of Observer "
     
    263259#endif
    264260    removeRightAtom();
    265     removeBond();
    266   } else if (publisher == rightobservable) {
     261  } else   if (publisher == static_cast<const Observable*>(rightatomref)) {
    267262#ifdef LOG_OBSERVER
    268263    observerLog().addMessage() << "++ subjectKilled of Observer " <<
     
    271266#endif
    272267    removeLeftAtom();
    273     removeBond();
    274268  } else {
    275269#ifdef LOG_OBSERVER
    276     observerLog().addMessage() << "++ subjectKilled of Observer " <<
    277     observerLog().getName(static_cast<Observer*>(this)) << " from unknown source.";
    278 #endif
     270    observerLog().addMessage() << "++ subjectKilled of Observer "
     271        << observerLog().getName(static_cast<Observer*>(this))
     272        << " from unknown source.";
     273#endif
     274    ASSERT(0, "GLMoleculeObject_bond::recieveNotification() - notification from unknown source.");
    279275  }
    280276  // then indicate to remove us
     
    286282{
    287283#ifdef LOG_OBSERVER
    288   if (publisher == static_cast<const Observable *>(&_bond)) {
     284  if (publisher == static_cast<const Observable *>(&bondref)) {
    289285    observerLog().addMessage() << "++ Update of Observer "
    290286        << observerLog().getName(static_cast<Observer*>(this))
    291287        << " received notification from bond for channel "
    292288        << notification->getChannelNo() << ".";
    293   } else if (publisher == leftobservable) {
     289  } else if (publisher == static_cast<const Observable * const>(leftatomref)) {
    294290    observerLog().addMessage() << "++ Update of Observer "
    295291        << observerLog().getName(static_cast<Observer*>(this))
    296292        << " received notification from leftatom " << leftatomId << " for channel "
    297293        << notification->getChannelNo() << ".";
    298   } else if (publisher == rightobservable) {
     294  } else if (publisher == static_cast<const Observable * const>(rightatomref)) {
    299295    observerLog().addMessage() << "++ Update of Observer "
    300296        << observerLog().getName(static_cast<Observer*>(this))
     
    306302        << " received notification from unknown source.";
    307303#endif
    308   bool DoResetPosition = false;
    309   bool DoResetWidth = false;
    310   if (publisher == static_cast<const Observable *>(&_bond)){
     304  if (publisher == static_cast<const Observable *>(&bondref)){
    311305    switch (notification->getChannelNo()) {
    312306    case BondObservable::BondRemoved:
     
    314308      break;
    315309    case BondObservable::DegreeChanged:
    316       DoResetWidth = true;
     310      emit degreeChanged();
    317311      break;
    318312    default:
     
    325319    case AtomObservable::PositionChanged:
    326320      LOG(2, "INFO: Received notification of PositionChanged.");
    327       DoResetPosition = true;
     321      emit positionChanged();
    328322      break;
    329323    case AtomObservable::ElementChanged:
    330324      LOG(2, "INFO: Received notification of ElementChanged.");
    331       DoResetPosition = true;
     325      emit elementChanged();
    332326      break;
    333327    default:
     
    335329    }
    336330  }
    337   if (DoResetPosition)
    338     resetPosition();
    339   if (DoResetWidth)
    340     resetWidth();
    341   if ((DoResetPosition) || (DoResetWidth))
    342     emit changed();
     331}
     332
     333Vector GLMoleculeObject_bond::updateLeftPosition() const
     334{
     335  const atom * const _atom = getAtomConst(leftatomId);
     336  return _atom->getPosition();
     337}
     338
     339Vector GLMoleculeObject_bond::updateRightPosition() const
     340{
     341  const atom * const _atom = getAtomConst(rightatomId);
     342  return _atom->getPosition();
     343}
     344
     345atomicNumber_t GLMoleculeObject_bond::updateLeftElement() const
     346{
     347  const atom * const _atom = getAtomConst(leftatomId);
     348  return _atom->getElementNo();
     349}
     350
     351atomicNumber_t GLMoleculeObject_bond::updateRightElement() const
     352{
     353  const atom * const _atom = getAtomConst(rightatomId);
     354  return _atom->getElementNo();
     355}
     356
     357int GLMoleculeObject_bond::updateDegree() const
     358{
     359  const atom * const _leftatom = const_cast<const World &>(World::getInstance()).
     360      getAtom(AtomById(leftatomId));
     361  const atom * const _rightatom = const_cast<const World &>(World::getInstance()).
     362      getAtom(AtomById(rightatomId));
     363  if ((_leftatom != NULL) && (_rightatom != NULL)) {
     364    bond::ptr _bond = _leftatom->getBond(_rightatom);
     365    return _bond->getDegree();
     366  } else {
     367    return 1;
     368  }
     369}
     370
     371void GLMoleculeObject_bond::resetElement()
     372{
     373  size_t elementno = rightElement.get();
     374  QGLMaterial *elementmaterial = getMaterial(elementno);
     375  setMaterial(elementmaterial);
    343376}
    344377
    345378void GLMoleculeObject_bond::resetWidth()
    346379{
    347   const double factor = 1.0f+.5f*(_bond.getDegree()-1);
     380  const double factor = 1.0f+.5f*(Degree.get()-1);
    348381  LOG(2, "DEBUG: GLMoleculeObject_bond::resetWidth() - setting bond's width to " << factor << ".");
    349382  setScaleX(factor);
    350383  setScaleY(factor);
     384
     385  emit changed();
    351386}
    352387
    353388void GLMoleculeObject_bond::resetPosition()
    354389{
    355   Vector Position;
    356   Vector OtherPosition;
    357   const atom * const _leftatom = const_cast<const World &>(World::getInstance()).
    358       getAtom(AtomById(leftatomId));
    359   Vector LeftPos = _leftatom->getPosition();
    360   const atom * const _rightatom = const_cast<const World &>(World::getInstance()).
    361       getAtom(AtomById(rightatomId));
    362   Vector RightPos = _rightatom->getPosition();
    363   switch (BondSide) {
    364     case left:
    365       Position = LeftPos;
    366       OtherPosition = RightPos;
    367       break;
    368     case right:
    369       Position = RightPos;
    370       OtherPosition = LeftPos;
    371       break;
    372     default:
    373       ASSERT(0,
    374           "GLMoleculeObject_bond::resetPosition() - side is not a valid argument: "+toString(BondSide)+".");
    375       break;
    376   }
     390  Vector Position = leftPosition.get();
     391  Vector OtherPosition = rightPosition.get();
    377392  const double distance =
    378393      Position.distance(OtherPosition)/2.;
     
    408423  setRotationVector(QVector3D(b[0], b[1], b[2]));
    409424  setRotationAngle(alpha/M_PI*180.);
    410 }
     425
     426  emit changed();
     427}
     428
     429atom * const GLMoleculeObject_bond::getAtom(const atomId_t _id)
     430{
     431  atom * const _atom = World::getInstance().getAtom(AtomById(_id));
     432  return _atom;
     433}
     434
     435const atom * const GLMoleculeObject_bond::getAtomConst(const atomId_t _id)
     436{
     437  const atom * const _atom = const_cast<const World &>(World::getInstance()).
     438      getAtom(AtomById(_id));
     439  return _atom;
     440}
  • src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.hpp

    r534374 r009e2e2  
    1717
    1818#include "CodePatterns/Observer/Observer.hpp"
     19#include "CodePatterns/ObservedValue.hpp"
     20
     21#include "LinearAlgebra/Vector.hpp"
    1922
    2023#include "Bond/bond.hpp"
     
    3134  enum SideOfBond { left, right };
    3235
    33   GLMoleculeObject_bond(QGLSceneNode *mesh[], QObject *parent, const bond::ptr bondref, const enum SideOfBond side);
     36  typedef std::pair<atomId_t, atomId_t> bondIds_t;
     37
     38  GLMoleculeObject_bond(QGLSceneNode *mesh[], QObject *parent, const bondIds_t bondIds, const enum SideOfBond side);
    3439  virtual ~GLMoleculeObject_bond();
    3540
     
    4146signals:
    4247  void BondRemoved(const atomId_t leftnr, const atomId_t rightnr);
     48  void elementChanged();
     49  void positionChanged();
     50  void degreeChanged();
    4351
    44 private:
     52private slots:
    4553  //!> grant GLMoleculeObject_molecule acess to reset functions
    4654  friend class GLMoleculeObject_molecule;
     55
     56  /** Recalculates the element of the cylinder representing the bond.
     57   *
     58   */
     59  void resetElement();
    4760
    4861  /** Recalculates the position of the cylinder representing the bond.
     
    5669  void resetWidth();
    5770
     71private:
    5872  /** This must be called from subjectKilled() only.
    5973   *
     
    7185  void removeRightAtom();
    7286  void removeChannels();
    73   void removeBond();
     87
     88  Vector updateLeftPosition() const;
     89  Vector updateRightPosition() const;
     90  atomicNumber_t updateLeftElement() const;
     91  atomicNumber_t updateRightElement() const;
     92  int updateDegree() const;
     93
     94  static const atom * const getAtomConst(const atomId_t _id);
     95  static atom * const getAtom(const atomId_t _id);
    7496
    7597private:
    76   const bond& _bond;
    77   /** Observable instance inside atom_observable for left bond partner.
    78    * We require this knowledge as subjectKilled is called by Observable, not
    79    * by AtomObservable which has already been destroyed at this time.
    80    *
    81    */
    82   const Observable *leftobservable;
    83   /** Observable instance inside atom_observable for right bond partner.
    84    * We require this knowledge as subjectKilled is called by Observable, not
    85    * by AtomObservable which has already been destroyed at this time.
    86    *
    87    */
    88   const Observable *rightobservable;
    89   //!> id of left bond partner for safely emitting BondRemoved sigbal
     98  //!> id of left bond partner for safely emitting BondRemoved signal
    9099  const atomId_t leftatomId;
    91   //!> id of right bond partner for safely emitting BondRemoved sigbal
     100  //!> id of right bond partner for safely emitting BondRemoved signal
    92101  const atomId_t rightatomId;
     102
     103  //!> temporary variable used in cstor
     104  const atom * const leftatomref;
     105  //!> temporary variable used in cstor
     106  const atom * const rightatomref;
     107  //!> temporary variable used in cstor
     108  const bond &bondref;
     109
    93110  const enum SideOfBond BondSide;
     111
     112  ObservedValue<Vector> leftPosition;
     113  ObservedValue<Vector> rightPosition;
     114  ObservedValue<atomicNumber_t> leftElement;
     115  ObservedValue<atomicNumber_t> rightElement;
     116  ObservedValue<int> Degree;
    94117
    95118  //!> indicate whether we are signed in to leftobservable
     
    97120  //!> indicate whether we are signed in to rightobservable
    98121  bool rightobservable_enabled;
    99   //!> indicate whether we are signed in to _bond
     122  //!> indicate whether we are signed in to bond itself
    100123  bool bond_enabled;
     124
     125  //!> list of channels when position needs to update
     126  static const Observable::channels_t BondPositionChannels;
     127  //!>list of channels when degree needs to update
     128  static const Observable::channels_t BondDegreeChannels;
     129  //!> list of channels when element needs to update
     130  static const Observable::channels_t BondElementChannels;
    101131};
    102132
  • src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp

    r534374 r009e2e2  
    591591  if (iter == BondsinSceneMap.end()) {
    592592    GLMoleculeObject_bond * bondObject =
    593         new GLMoleculeObject_bond(GLMoleculeObject::meshCylinder, this, _bond, _side);
     593        new GLMoleculeObject_bond(GLMoleculeObject::meshCylinder, this, ids, _side);
    594594    connect (
    595595        bondObject, SIGNAL(BondRemoved(const atomId_t, const atomId_t)),
Note: See TracChangeset for help on using the changeset viewer.