Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision efeeb77d0498bbfe882b8473da74a31a8d40277f)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision 1eba7cfbf78368fcfda41c0aafd0173295c50739)
@@ -229,25 +229,24 @@
   connect(_atom.get(), SIGNAL(moleculeChanged()), this, SLOT(reparentAtom()));
 
+  boost::recursive_mutex::scoped_lock lock(Atom_mutex);
+
   // store the object, as we need it on reparenting
-  {
+  const ObservedValue_Index_t atomid = _atom->getIndex();
 #ifndef NDEBUG
-    std::pair< ObservedAtoms_t::iterator, bool > inserter =
+  std::pair< ObservedAtoms_t::iterator, bool > inserter =
 #endif
-        ObservedAtoms.insert( std::make_pair(_atom.get(), _atom) );
-    ASSERT( inserter.second,
-        "GLWorldScene::connectAtom() - observed atom "+toString(_atom)+" already stored?");
+      ObservedAtoms.insert( std::make_pair(_atom.get(), _atom) );
+  ASSERT( inserter.second,
+      "GLWorldScene::connectAtom() - observed atom "+toString(_atom)+" already stored?");
 #ifndef NDEBUG
-    std::pair< ObservedValueIndexLookup_t::iterator, bool > indexinserter =
+  std::pair< ObservedValueIndexLookup_t::iterator, bool > indexinserter =
 #endif
-        ObservedValueIndexLookup.insert( std::make_pair(_atom->getIndex(), _atom.get()) );
-    ASSERT( indexinserter.second,
-        "GLWorldScene::connectAtom() - observed atom's index "
-        +toString(_atom->getIndex())+" already stored?");
-  }
-  {
-    const ObservedValue_Index_t atomid = _atom->getIndex();
-    boost::recursive_mutex::scoped_lock lock(AtomNodeParentMap_mutex);
-    AtomNodeParentMap.left.insert( std::make_pair(atomid, (ObservedValue_Index_t)NULL) );
-  }
+      ObservedValueIndexLookup.insert( std::make_pair(atomid, _atom.get()) );
+  ASSERT( indexinserter.second,
+      "GLWorldScene::connectAtom() - observed atom's index "
+      +toString(atomid)+" already stored?");
+
+  // and create entry in the parent map
+  AtomNodeParentMap.left.insert( std::make_pair(atomid, (ObservedValue_Index_t)NULL) );
 
   emit atomConnected(_atom);
@@ -262,4 +261,5 @@
   LOG(3, "INFO: GLWorldScene: Received signal atomInserted for atom "
       << _atom->getAtomIndex());
+  boost::recursive_mutex::scoped_lock lock(Atom_mutex);
 
   const ObservedValue_Index_t atomid = _atom->getIndex();
@@ -267,5 +267,4 @@
   GLMoleculeObject_atom *atomObject = NULL;
   {
-    boost::recursive_mutex::scoped_lock lock(AtomNodeParentMap_mutex);
     AtomNodeParentMap_t::left_iterator parentiter = AtomNodeParentMap.left.find(atomid);
     ASSERT (parentiter != AtomNodeParentMap.left.end(),
@@ -335,5 +334,5 @@
 void GLWorldScene::checkAndRemoveAtom(const ObservedValue_Index_t &_atomid)
 {
-  boost::recursive_mutex::scoped_lock lock(AtomNodeParentMap_mutex);
+  boost::recursive_mutex::scoped_lock lock(Atom_mutex);
 
   if (checkAtomRemoval(AtomNodeParentMap, ToBeRemovedNodes, _atomid)) {
@@ -354,4 +353,5 @@
   LOG(3, "INFO: GLWorldScene: Received signal atomRemoved for atom "+toString(_atomid)+".");
   // bonds are removed by signal coming from ~bond
+  boost::recursive_mutex::scoped_lock lock(Atom_mutex);
 
   ASSERT( ToBeRemovedNodes.count(_atomid) == 0,
@@ -381,5 +381,8 @@
   connect(_bond.get(), SIGNAL(rightmoleculeChanged()), this, SLOT(reparentBondRight()), Qt::QueuedConnection);
 
+  boost::recursive_mutex::scoped_lock lock(Bond_mutex);
+
   // store the object, as we need it on reparenting
+  const ObservedValue_Index_t bondid = _bond->getIndex();
   {
 #ifndef NDEBUG
@@ -392,12 +395,10 @@
     std::pair< ObservedValueIndexLookup_t::iterator, bool > indexinserter =
 #endif
-        ObservedValueIndexLookup.insert( std::make_pair(_bond->getIndex(), _bond.get()) );
+        ObservedValueIndexLookup.insert( std::make_pair(bondid, _bond.get()) );
     ASSERT( indexinserter.second,
         "GLWorldScene::connectBond() - observed bond's index "
-        +toString(_bond->getIndex())+" already stored?");
+        +toString(bondid)+" already stored?");
   }
   {
-    const ObservedValue_Index_t bondid = _bond->getIndex();
-    boost::recursive_mutex::scoped_lock lock(BondNodeParentMap_mutex);
     if ((_bond->getLeftAtom() != NULL) && (_bond->getLeftAtom()->getMoleculeRef() != NULL))
       BondNodeParentMaps[0].left.insert(
@@ -423,5 +424,7 @@
 void GLWorldScene::insertBond(QtObservedBond::ptr _bond)
 {
-  static const std::vector< GLMoleculeObject_bond::SideOfBond > bondsides =
+  boost::recursive_mutex::scoped_lock lock(Bond_mutex);
+
+  const std::vector< GLMoleculeObject_bond::SideOfBond > bondsides =
       boost::assign::list_of<GLMoleculeObject_bond::SideOfBond>
           (GLMoleculeObject_bond::left)
@@ -436,5 +439,4 @@
 #endif
   {
-    boost::recursive_mutex::scoped_lock lock(BondNodeParentMap_mutex);
     for (size_t i=0;i<2;++i) {
       BondNodeParentMap_t::left_iterator parentiter = BondNodeParentMaps[i].left.find(bondid);
@@ -464,4 +466,6 @@
 void GLWorldScene::checkAndRemoveBond(const ObservedValue_Index_t &_bondid)
 {
+  boost::recursive_mutex::scoped_lock lock(Bond_mutex);
+
   if (checkBondRemoval(BondNodeParentMaps, ToBeRemovedNodes, _bondid)) {
     LOG(3, "DEBUG: Found both parents of to be removed bond " << _bondid << " as GLWorldScene, removing.");
@@ -479,5 +483,5 @@
 void GLWorldScene::removeBond(ObservedValue_Index_t _bondid)
 {
-  boost::recursive_mutex::scoped_lock lock(BondNodeParentMap_mutex);
+  boost::recursive_mutex::scoped_lock lock(Bond_mutex);
   LOG(3, "INFO: GLWorldScene::removedBond() - got bondRemoved signal from board for id " << _bondid);
 
@@ -495,4 +499,5 @@
 void GLWorldScene::hoverChangedSignalled(GLMoleculeObject *ob)
 {
+  boost::recursive_mutex::scoped_lock lock(Atom_mutex);
   // Find the atom, ob corresponds to.
   hoverAtomId = -1;
@@ -565,5 +570,5 @@
   // check all atoms for not yet assigned parents
   {
-    boost::recursive_mutex::scoped_lock lock(AtomNodeParentMap_mutex);
+    boost::recursive_mutex::scoped_lock lock(Atom_mutex);
     std::pair<AtomNodeParentMap_t::right_const_iterator, AtomNodeParentMap_t::right_const_iterator> iters =
         AtomNodeParentMap.right.equal_range(molid);
@@ -577,5 +582,5 @@
   // check all bonds for not yet assigned parents
   {
-    boost::recursive_mutex::scoped_lock lock(BondNodeParentMap_mutex);
+    boost::recursive_mutex::scoped_lock lock(Bond_mutex);
     for (size_t i=0;i<2;++i) {
       std::pair<BondNodeParentMap_t::right_const_iterator, BondNodeParentMap_t::right_const_iterator> iters =
@@ -671,5 +676,5 @@
 void GLWorldScene::reparentAtom()
 {
-  boost::recursive_mutex::scoped_lock lock(AtomNodeParentMap_mutex);
+  boost::recursive_mutex::scoped_lock lock(Atom_mutex);
   QObject * origin = sender();
   if (origin == NULL) {
@@ -709,5 +714,5 @@
 void GLWorldScene::reparentBondLeft()
 {
-  boost::recursive_mutex::scoped_lock lock(BondNodeParentMap_mutex);
+  boost::recursive_mutex::scoped_lock lock(Bond_mutex);
   QObject * origin = sender();
   if (origin == NULL) {
@@ -732,5 +737,5 @@
 void GLWorldScene::reparentBondRight()
 {
-  boost::recursive_mutex::scoped_lock lock(BondNodeParentMap_mutex);
+  boost::recursive_mutex::scoped_lock lock(Bond_mutex);
   QObject * origin = sender();
   if (origin == NULL) {
@@ -777,5 +782,5 @@
     const GLMoleculeObject_bond::SideOfBond _side)
 {
-  boost::recursive_mutex::scoped_lock lock(BondNodeParentMap_mutex);
+  boost::recursive_mutex::scoped_lock lock(Bond_mutex);
   const size_t dim = (_side == GLMoleculeObject_bond::left) ? 0 : 1;
   const ObservedValue_Index_t bondid = _bond->getIndex();
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision efeeb77d0498bbfe882b8473da74a31a8d40277f)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision 1eba7cfbf78368fcfda41c0aafd0173295c50739)
@@ -170,7 +170,8 @@
   atomId_t hoverAtomId;
 
-  //!> mutex to ascertain atomic access to NodeParentMaps
-  boost::recursive_mutex AtomNodeParentMap_mutex;
-  boost::recursive_mutex BondNodeParentMap_mutex;
+  //!> mutex to ascertain atomic access to atom-related internal maps
+  boost::recursive_mutex Atom_mutex;
+  //!> mutex to ascertain atomic access to bond-related internal maps
+  boost::recursive_mutex Bond_mutex;
 
   AtomNodeMap AtomsinSceneMap;
