Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp	(revision 16bd376fd9b011d5e40fc688f849c8418b4ad1f9)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp	(revision 099f67dcc87a9df01ccc2248c45c7116c48065cb)
@@ -62,4 +62,6 @@
 // static entities
 const Observable::channels_t
+GLMoleculeObject_bond::IndexChannels(1, AtomObservable::IndexChanged);
+const Observable::channels_t
 GLMoleculeObject_bond::BondPositionChannels(1, AtomObservable::PositionChanged);
 const Observable::channels_t
@@ -78,9 +80,7 @@
       +std::string("-")
       +toString(bondIds.second)),
-  leftatomId(bondIds.first),
-  rightatomId(bondIds.second),
-  leftowner(getAtom(leftatomId)),
-  rightowner(getAtom(rightatomId)),
-  bondowner(getAtom(leftatomId)->getBond(getAtom(rightatomId)).get()),
+  leftowner(getAtomConst(bondIds.first)),
+  rightowner(getAtomConst(bondIds.second)),
+  bondowner(getAtomConst(bondIds.first)->getBond(getAtomConst(bondIds.second)).get()),
   BondSide(side),
   ObservedValues(MAX_ObservedTypes),
@@ -89,5 +89,7 @@
   rightobservable_enabled(false)
 {
-  initObservedValues();
+  boost::function<void()> subjectKilled =
+      boost::bind(&GLMoleculeObject_bond::countsubjectKilled, this);
+  initObservedValues(ObservedValues, bondIds.first, bondIds.second, leftowner, rightowner, bondowner, subjectKilled);
 
   // sign on as observer (obtain non-const instance before)
@@ -114,8 +116,8 @@
 {
   LOG(3, "DEBUG: Destroying  GLMoleculeObject_bond to bond [" <<
-      leftatomId << "," << rightatomId << "] and side " << BondSide << ".");
+      getleftIndex() << "," << getrightIndex() << "] and side " << BondSide << ".");
   // signOff() if not already done
   removeChannels();
-  destroyObservedValues();
+  destroyObservedValues(ObservedValues);
 }
 
@@ -171,10 +173,10 @@
     observerLog().addMessage() << "++ Update of Observer "
         << observerLog().getName(static_cast<Observer*>(this))
-        << " received notification from leftatom " << leftatomId << " for channel "
+        << " received notification from leftatom " << getleftIndex() << " for channel "
         << notification->getChannelNo() << ".";
   } else if (publisher == static_cast<const Observable * const>(rightowner)) {
     observerLog().addMessage() << "++ Update of Observer "
         << observerLog().getName(static_cast<Observer*>(this))
-        << " received notification from rightatom " << rightatomId << " for channel "
+        << " received notification from rightatom " << getrightIndex() << " for channel "
         << notification->getChannelNo() << ".";
   }
@@ -209,34 +211,45 @@
 }
 
-Vector GLMoleculeObject_bond::updateLeftPosition() const
-{
-  const atom * const _atom = getAtomConst(leftatomId);
+atomId_t GLMoleculeObject_bond::updateIndex()
+{
+  return const_cast<const World &>(World::getInstance()).lastChangedAtomId();
+}
+
+Vector GLMoleculeObject_bond::updateLeftPosition(
+    const boost::function<const atomId_t ()> &_getLeftAtomIndex)
+{
+  const atom * const _atom = getAtomConst(_getLeftAtomIndex());
   return _atom->getPosition();
 }
 
-Vector GLMoleculeObject_bond::updateRightPosition() const
-{
-  const atom * const _atom = getAtomConst(rightatomId);
+Vector GLMoleculeObject_bond::updateRightPosition(
+    const boost::function<const atomId_t ()> &_getRightAtomIndex)
+{
+  const atom * const _atom = getAtomConst(_getRightAtomIndex());
   return _atom->getPosition();
 }
 
-atomicNumber_t GLMoleculeObject_bond::updateLeftElement() const
-{
-  const atom * const _atom = getAtomConst(leftatomId);
+atomicNumber_t GLMoleculeObject_bond::updateLeftElement(
+    const boost::function<const atomId_t ()> &_getLeftAtomIndex)
+{
+  const atom * const _atom = getAtomConst(_getLeftAtomIndex());
   return _atom->getElementNo();
 }
 
-atomicNumber_t GLMoleculeObject_bond::updateRightElement() const
-{
-  const atom * const _atom = getAtomConst(rightatomId);
+atomicNumber_t GLMoleculeObject_bond::updateRightElement(
+    const boost::function<const atomId_t ()> &_getRightAtomIndex)
+{
+  const atom * const _atom = getAtomConst(_getRightAtomIndex());
   return _atom->getElementNo();
 }
 
-int GLMoleculeObject_bond::updateDegree() const
+int GLMoleculeObject_bond::updateDegree(
+    const boost::function<const atomId_t ()> &_getLeftAtomIndex,
+    const boost::function<const atomId_t ()> &_getRightAtomIndex)
 {
   const atom * const _leftatom = const_cast<const World &>(World::getInstance()).
-      getAtom(AtomById(leftatomId));
+      getAtom(AtomById(_getLeftAtomIndex()));
   const atom * const _rightatom = const_cast<const World &>(World::getInstance()).
-      getAtom(AtomById(rightatomId));
+      getAtom(AtomById(_getRightAtomIndex()));
   if ((_leftatom != NULL) && (_rightatom != NULL)) {
     bond::ptr _bond = _leftatom->getBond(_rightatom);
@@ -323,57 +336,129 @@
 
   if (subjectKilledCount > ObservedValues.size())
-    emit BondRemoved(leftatomId, rightatomId);
-}
-
-void GLMoleculeObject_bond::initObservedValues()
-{
-  // fill ObservedValues
-  boost::function<void()> subjectKilled =
-      boost::bind(&GLMoleculeObject_bond::countsubjectKilled, this);
-  ObservedValues[leftPosition] = new ObservedValue_wCallback<Vector>(
-      leftowner,
-      boost::bind(&GLMoleculeObject_bond::updateLeftPosition, this),
-      "BondleftPosition_"+toString(leftatomId),
-      updateLeftPosition(),
+    emit BondRemoved(getleftIndex(), getrightIndex());
+}
+
+void GLMoleculeObject_bond::initObservedValues(
+    std::vector<boost::any> &_ObservedValues,
+    const atomId_t _leftatomId,
+    const atomId_t _rightatomId,
+    const Observable * const _leftowner,
+    const Observable * const _rightowner,
+    const Observable * const _bondowner,
+    const boost::function<void()> &_subjectKilled)
+{
+  /* This is an old note from when the code was still part of cstor's initializer body.
+   * TODO: Probably does not apply anymore but has not yet been tested.
+   *
+   * We must not use boost::cref(this) as "this" has not been properly constructed and seemingly
+   * boost::cref tries to do some magic to grasp the inheritance hierarchy which fails because
+   * the class has not been fully constructed yet. "This" itself seems to be working fine.
+   */
+
+  ASSERT( _ObservedValues.size() == MAX_ObservedTypes,
+      "GLMoleculeObject_bond::initObservedValues() - given ObservedValues has not correct size.");
+
+  // fill ObservedValues: index first
+  // Note that we only need one as the function just checks on the last changed id
+  // and ids cannot be changed simultaneously
+  const boost::function<atomId_t ()> AtomIndexUpdater(
+      boost::bind(&GLMoleculeObject_bond::updateIndex));
+
+  ObservedValue_wCallback<atomId_t> * const LeftIndexObservable =
+      new ObservedValue_wCallback<atomId_t>(
+        _leftowner,
+        AtomIndexUpdater,
+        "Bonds_LeftAtomIndex_"+toString(_leftatomId),
+        _leftatomId,
+        IndexChannels,
+        _subjectKilled);
+  _ObservedValues[leftIndex] = LeftIndexObservable;
+  ObservedValue_wCallback<atomId_t> * const RightIndexObservable =
+      new ObservedValue_wCallback<atomId_t>(
+        _rightowner,
+        AtomIndexUpdater,
+        "Bonds_RightAtomIndex_"+toString(_rightatomId),
+        _rightatomId,
+        IndexChannels,
+        _subjectKilled);
+  _ObservedValues[rightIndex] = RightIndexObservable;
+
+  const boost::function<const atomId_t ()> LeftIndexGetter =
+      boost::bind(&ObservedValue_wCallback<atomId_t>::get,
+          LeftIndexObservable);
+  const boost::function<const atomId_t ()> RightIndexGetter =
+      boost::bind(&ObservedValue_wCallback<atomId_t>::get,
+          RightIndexObservable);
+
+  // fill ObservedValues: then all the other that need index
+  const boost::function<Vector ()> LeftPositionUpdater(
+      boost::bind(&GLMoleculeObject_bond::updateLeftPosition, LeftIndexGetter));
+  const boost::function<Vector ()> RightPositionUpdater(
+      boost::bind(&GLMoleculeObject_bond::updateRightPosition, RightIndexGetter));
+  const boost::function<atomicNumber_t ()> LeftElementUpdater(
+      boost::bind(&GLMoleculeObject_bond::updateLeftElement, LeftIndexGetter));
+  const boost::function<atomicNumber_t ()> RightElementUpdater(
+      boost::bind(&GLMoleculeObject_bond::updateRightElement, RightIndexGetter));
+  const boost::function<int ()> DegreeUpdater(
+      boost::bind(&GLMoleculeObject_bond::updateDegree, LeftIndexGetter, RightIndexGetter));
+
+  _ObservedValues[leftPosition] = new ObservedValue_wCallback<Vector>(
+      _leftowner,
+      LeftPositionUpdater,
+      "BondleftPosition_"+toString(_leftatomId),
+      LeftPositionUpdater(),
       BondPositionChannels,
-      subjectKilled);
-  ObservedValues[rightPosition] = new ObservedValue_wCallback<Vector>(
-      rightowner,
-      boost::bind(&GLMoleculeObject_bond::updateRightPosition, this),
-      "BondrightPosition_"+toString(rightatomId),
-      updateRightPosition(),
+      _subjectKilled);
+  _ObservedValues[rightPosition] = new ObservedValue_wCallback<Vector>(
+      _rightowner,
+      RightPositionUpdater,
+      "BondrightPosition_"+toString(_rightatomId),
+      RightPositionUpdater(),
       BondPositionChannels,
-      subjectKilled);
-  ObservedValues[leftElement] = new ObservedValue_wCallback<atomicNumber_t>(
-      leftowner,
-      boost::bind(&GLMoleculeObject_bond::updateLeftElement, this),
-      "BondleftElement"+toString(leftatomId),
-      updateLeftElement(),
+      _subjectKilled);
+  _ObservedValues[leftElement] = new ObservedValue_wCallback<atomicNumber_t>(
+      _leftowner,
+      LeftElementUpdater,
+      "BondleftElement"+toString(_leftatomId),
+      LeftElementUpdater(),
       BondElementChannels,
-      subjectKilled);
-  ObservedValues[rightElement] = new ObservedValue_wCallback<atomicNumber_t>(
-      rightowner,
-      boost::bind(&GLMoleculeObject_bond::updateRightElement, this),
-      "BondrightElement"+toString(rightatomId),
-      updateRightElement(),
+      _subjectKilled);
+  _ObservedValues[rightElement] = new ObservedValue_wCallback<atomicNumber_t>(
+      _rightowner,
+      RightElementUpdater,
+      "BondrightElement"+toString(_rightatomId),
+      RightElementUpdater(),
       BondElementChannels,
-      subjectKilled);
-  ObservedValues[Degree] = new ObservedValue_wCallback<int>(
-      bondowner,
-      boost::bind(&GLMoleculeObject_bond::updateDegree, this),
-      "BondDegree"+toString(leftatomId)+"_"+toString(rightatomId),
-      updateDegree(),
+      _subjectKilled);
+  _ObservedValues[Degree] = new ObservedValue_wCallback<int>(
+      _bondowner,
+      DegreeUpdater,
+      "BondDegree"+toString(_leftatomId)+"_"+toString(_rightatomId),
+      DegreeUpdater(),
       BondDegreeChannels,
-      subjectKilled);
-}
-
-void GLMoleculeObject_bond::destroyObservedValues()
-{
-  delete boost::any_cast<ObservedValue_wCallback<Vector> *>(ObservedValues[leftPosition]);
-  delete boost::any_cast<ObservedValue_wCallback<Vector> *>(ObservedValues[rightPosition]);
-  delete boost::any_cast<ObservedValue_wCallback<atomicNumber_t> *>(ObservedValues[leftElement]);
-  delete boost::any_cast<ObservedValue_wCallback<atomicNumber_t> *>(ObservedValues[rightElement]);
-  delete boost::any_cast<ObservedValue_wCallback<int> *>(ObservedValues[Degree]);
-  ObservedValues.clear();
+      _subjectKilled);
+}
+
+void GLMoleculeObject_bond::destroyObservedValues(
+    std::vector<boost::any> &_ObservedValues)
+{
+  delete boost::any_cast<ObservedValue_wCallback<atomId_t> *>(_ObservedValues[leftIndex]);
+  delete boost::any_cast<ObservedValue_wCallback<atomId_t> *>(_ObservedValues[rightIndex]);
+  delete boost::any_cast<ObservedValue_wCallback<Vector> *>(_ObservedValues[leftPosition]);
+  delete boost::any_cast<ObservedValue_wCallback<Vector> *>(_ObservedValues[rightPosition]);
+  delete boost::any_cast<ObservedValue_wCallback<atomicNumber_t> *>(_ObservedValues[leftElement]);
+  delete boost::any_cast<ObservedValue_wCallback<atomicNumber_t> *>(_ObservedValues[rightElement]);
+  delete boost::any_cast<ObservedValue_wCallback<int> *>(_ObservedValues[Degree]);
+  _ObservedValues.clear();
+}
+
+atomId_t GLMoleculeObject_bond::getleftIndex() const
+{
+  return boost::any_cast<ObservedValue_wCallback<atomId_t> *>(ObservedValues[leftIndex])->get();
+}
+
+atomId_t GLMoleculeObject_bond::getrightIndex() const
+{
+  return boost::any_cast<ObservedValue_wCallback<atomId_t> *>(ObservedValues[rightIndex])->get();
 }
 
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.hpp	(revision 16bd376fd9b011d5e40fc688f849c8418b4ad1f9)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.hpp	(revision 099f67dcc87a9df01ccc2248c45c7116c48065cb)
@@ -75,9 +75,16 @@
   void removeChannels();
 
-  Vector updateLeftPosition() const;
-  Vector updateRightPosition() const;
-  atomicNumber_t updateLeftElement() const;
-  atomicNumber_t updateRightElement() const;
-  int updateDegree() const;
+  static atomId_t updateIndex();
+  static Vector updateLeftPosition(
+      const boost::function<const atomId_t ()> &_getLeftAtomIndex);
+  static Vector updateRightPosition(
+      const boost::function<const atomId_t ()> &_getRightAtomIndex);
+  static atomicNumber_t updateLeftElement(
+      const boost::function<const atomId_t ()> &_getLeftAtomIndex);
+  static atomicNumber_t updateRightElement(
+      const boost::function<const atomId_t ()> &_getRightAtomIndex);
+  static int updateDegree(
+      const boost::function<const atomId_t ()> &_getLeftAtomIndex,
+      const boost::function<const atomId_t ()> &_getRightAtomIndex);
 
   static const atom * const getAtomConst(const atomId_t _id);
@@ -85,9 +92,4 @@
 
 private:
-  //!> id of left bond partner for safely emitting BondRemoved signal
-  const atomId_t leftatomId;
-  //!> id of right bond partner for safely emitting BondRemoved signal
-  const atomId_t rightatomId;
-
   //!> contains ref to Observable of left atom
   const Observable * const leftowner;
@@ -105,4 +107,8 @@
   //!> enumeration of observed values to match with entries in ObservedValues
   enum ObservedTypes {
+    //!> contains the id of the left atom
+    leftIndex,
+    //!> contains the id of the right atom
+    rightIndex,
     //!> contains the position of the left atom
     leftPosition,
@@ -124,11 +130,39 @@
   /** Initializes all \a ObservedValues entries.
    *
-   */
-  void initObservedValues();
+   * \param _ObservedValues vector of ObservedValue to be filled
+   * \param _leftatomId left atom id
+   * \param _rightatomId right atom id
+   * \param _leftowner reference to left atom
+   * \param _rightowner reference to right atom
+   * \param _bondowner reference to bond
+   * \param _subjectKilled ref to function to call on subjectKilled()
+   */
+  static void initObservedValues(
+      std::vector<boost::any> &_ObservedValues,
+      const atomId_t _leftatomId,
+      const atomId_t _rightatomId,
+      const Observable * const _leftowner,
+      const Observable * const _rightowner,
+      const Observable * const _bondowner,
+      const boost::function<void()> &_subjectKilled);
 
   /** Destroys all \a ObservedValues entries.
    *
-   */
-  void destroyObservedValues();
+   * \param _ObservedValues vector of ObservedValue to be destroyed
+   */
+  static void destroyObservedValues(
+      std::vector<boost::any> &_ObservedValues);
+
+  /** Getter to left atom's id contained in \a ObservedValues.
+   *
+   * \return left atom's id
+   */
+  atomId_t getleftIndex() const;
+
+  /** Getter to right atom's id contained in \a ObservedValues.
+   *
+   * \return right atom's id
+   */
+  atomId_t getrightIndex() const;
 
   /** Getter to left atom's position contained in \a ObservedValues.
@@ -183,4 +217,6 @@
   bool bond_enabled;
 
+  //!> list of channels when id needs to update
+  static const Observable::channels_t IndexChannels;
   //!> list of channels when position needs to update
   static const Observable::channels_t BondPositionChannels;
