Index: src/UIElements/Views/Qt4/QtElementList.cpp
===================================================================
--- src/UIElements/Views/Qt4/QtElementList.cpp	(revision ea73ce1f1f7bfca1ca449bed235f03c42b10b58b)
+++ src/UIElements/Views/Qt4/QtElementList.cpp	(revision 9fb2137ff4183dfa58b9083f255c8037873fb5ba)
@@ -67,11 +67,12 @@
 
 	dirty = true;
-	refill();
 
 	AtomObserver::getInstance().signOn(this, atom::ElementChanged);
 
   connect(this,SIGNAL(itemSelectionChanged()),this,SLOT(rowSelected()));
-  connect(this,SIGNAL(needsRefill()),this,SLOT(refill()), Qt::QueuedConnection);
+  connect(this,SIGNAL(needsRefill(const atomId_t)),this,SLOT(refill(const atomId_t)), Qt::QueuedConnection);
 //  connect(this,SIGNAL(changed()),this,SLOT(update()));
+
+//  emit needsRefill();
 }
 
@@ -93,5 +94,5 @@
     dirty = true;
 
-    refill();
+    emit needsRefill(dynamic_cast<atom *>(publisher)->getId());
   } else
     ASSERT(0, "QtElementList::recieveNotification() - we are not enlisted to any other instance's channel.");
@@ -103,14 +104,22 @@
   // incompatible with the current refill scheme
   AtomElementMap_t::iterator iter = AtomElementMap.find(_atom.getId());
+  if (iter == AtomElementMap.end()) {
+    AtomElementMap.insert( std::make_pair(_atom.getId(), -1));
+    iter = AtomElementMap.find(_atom.getId());
+  }
   const atomicNumber_t oldelement = iter->second;
   const atomicNumber_t newelement = _atom.getElementNo();
   iter->second = newelement;
-  QTreeWidgetItem *oldtreeItem = topLevelItem(oldelement-1);
+  QTreeWidgetItem *oldtreeItem = NULL;
+  if (oldelement != (atomicNumber_t)-1)
+    oldtreeItem = topLevelItem(oldelement-1);
   QTreeWidgetItem *newtreeItem = topLevelItem(newelement-1);
-  ASSERT( (oldtreeItem != NULL) && (newtreeItem != NULL),
-      "QtElementList::updateElement() - missing element item.");
-  int count_old = oldtreeItem->text(OCCURRENCE).toInt();
-  int count_new = newtreeItem->text(OCCURRENCE).toInt();
-  setOccurrence(*oldtreeItem, count_old-1);
+  ASSERT( (newtreeItem != NULL),
+      "QtElementList::updateElement() - missing new element item.");
+  if (oldelement != (atomicNumber_t)-1) {
+    const int count_old = oldtreeItem->text(OCCURRENCE).toInt();
+    setOccurrence(*oldtreeItem, count_old-1);
+  }
+  const int count_new = newtreeItem->text(OCCURRENCE).toInt();
   setOccurrence(*newtreeItem, count_new+1);
 }
@@ -118,9 +127,11 @@
 void QtElementList::setOccurrence(QTreeWidgetItem &_item, const int count)
 {
-  if (count < 0) {
-    // something must be very wrong, rather refill
-    dirty = true;
-    refill();
-  } else {
+  ASSERT (count >= 0,
+      "QtElementList::setOccurrence() - count for an elment < 0.");
+
+//    // something must be very wrong, rather refill
+//    dirty = true;
+//    refill();
+//  } else {
     if (count > 0) {
       _item.setText(OCCURRENCE, QString::number(count));
@@ -129,36 +140,48 @@
       _item.setDisabled(true);
     }
-  }
-}
-
-void QtElementList::refill() 
+//  }
+}
+
+void QtElementList::refill(const atomId_t _atomid)
 {
   refill_mutex.lock();
 
-  periodentafel *&periode = World::getInstance().getPeriode();
-
-  elementSelection.clear();
-
-  int i;
-
-  clear();
-  periodentafel::const_iterator iter;
-  for(iter = periode->begin(),i=0;
-      iter != periode->end();
-      ++i,++iter) {
-    const element *e = iter->second;
-    int count = 0;
-    count = const_cast<const World &>(World::getInstance()).
-        getAllAtoms(AtomByType(e)).size();
-
-    QTreeWidgetItem *treeItem = new QTreeWidgetItem(this);
-    treeItem->setText(NUMBER, QString::number(e->getAtomicNumber()));
-    treeItem->setText(NAME, QString(e->getName().c_str()));
-    treeItem->setText(SYMBOL, QString(e->getSymbol().c_str()));
-    treeItem->setText(MASS, QString::number(e->getMass()));
-    setOccurrence(*treeItem, count);
-    elementSelection.push_back(treeItem->isSelected());
-  }
-  dirty = false;
+//  periodentafel *&periode = World::getInstance().getPeriode();
+//
+//  elementSelection.clear();
+//
+//  int i;
+//
+//  clear();
+//  periodentafel::const_iterator iter;
+//  for(iter = periode->begin(),i=0;
+//      iter != periode->end();
+//      ++i,++iter) {
+//    const element *e = iter->second;
+//    int count = 0;
+//    count = const_cast<const World &>(World::getInstance()).
+//        getAllAtoms(AtomByType(e)).size();
+//
+//    QTreeWidgetItem *treeItem = new QTreeWidgetItem(this);
+//    treeItem->setText(NUMBER, QString::number(e->getAtomicNumber()));
+//    treeItem->setText(NAME, QString(e->getName().c_str()));
+//    treeItem->setText(SYMBOL, QString(e->getSymbol().c_str()));
+//    treeItem->setText(MASS, QString::number(e->getMass()));
+//    setOccurrence(*treeItem, count);
+//    elementSelection.push_back(treeItem->isSelected());
+//  }
+//  dirty = false
+  const atom * const walker = const_cast<const World &>(World::getInstance()).
+      getAtom(AtomById(_atomid));
+  if (walker != NULL)
+    updateElement(*walker);
+  else {
+    AtomElementMap_t::iterator iter = AtomElementMap.find(_atomid);
+    QTreeWidgetItem *oldtreeItem = topLevelItem(iter->second-1);
+    const int count_old = oldtreeItem->text(OCCURRENCE).toInt();
+    setOccurrence(*oldtreeItem, count_old-1);
+
+    AtomElementMap.erase(iter);
+  }
 
   refill_mutex.unlock();
@@ -167,6 +190,6 @@
 void QtElementList::paintEvent(QPaintEvent * event)
 {
-  if (dirty)
-    refill();
+//  if (dirty)
+//    refill();
   QTreeWidget::paintEvent(event);
 }
Index: src/UIElements/Views/Qt4/QtElementList.hpp
===================================================================
--- src/UIElements/Views/Qt4/QtElementList.hpp	(revision ea73ce1f1f7bfca1ca449bed235f03c42b10b58b)
+++ src/UIElements/Views/Qt4/QtElementList.hpp	(revision 9fb2137ff4183dfa58b9083f255c8037873fb5ba)
@@ -38,5 +38,4 @@
   virtual void subjectKilled(Observable *publisher);
   virtual void paintEvent(QPaintEvent * event);
-  void refill();
 
   void setOccurrence(QTreeWidgetItem &_item, const int count);
@@ -47,6 +46,10 @@
   static const char *COLUMNNAMES[];
 
+signals:
+  void needsRefill(const atomId_t);
+
 private slots:
   void rowSelected();
+  void refill(const atomId_t);
 
 private:
