Index: /trunk/FACT++/gui/FactGui.h
===================================================================
--- /trunk/FACT++/gui/FactGui.h	(revision 13825)
+++ /trunk/FACT++/gui/FactGui.h	(revision 13826)
@@ -292,12 +292,16 @@
         DimNetwork::AddServer(s);
 
+        const State state = GetState(s, GetCurrentState(s));
+
         QApplication::postEvent(this,
-           new FunctionEvent(bind(&FactGui::handleAddServer, this, s)));
+           new FunctionEvent(bind(&FactGui::handleAddServer, this, s, state)));
     }
 
     void AddService(const string &server, const string &service, const string &fmt, bool iscmd)
     {
+        const vector<Description> v = GetDescription(server, service);
+
         QApplication::postEvent(this,
-           new FunctionEvent(bind(&FactGui::handleAddService, this, server, service, fmt, iscmd)));
+           new FunctionEvent(bind(&FactGui::handleAddService, this, server, service, fmt, iscmd, v)));
     }
 
@@ -320,21 +324,21 @@
     void AddDescription(const string &server, const string &service, const vector<Description> &vec)
     {
+        const bool iscmd = IsCommand(server, service)==true;
+
         QApplication::postEvent(this,
-           new FunctionEvent(bind(&FactGui::handleAddDescription, this, server, service, vec)));
+           new FunctionEvent(bind(&FactGui::handleAddDescription, this, server, service, vec, iscmd)));
     }
 
     // ======================================================================
 
-    void handleAddServer(const string &server)
-    {
-        const State s = GetState(server, GetCurrentState(server));
-        handleStateChanged(Time(), server, s);
-    }
-
-    void handleAddService(const string &server, const string &service, const string &/*fmt*/, bool iscmd)
+    void handleAddServer(const string &server, const State &state)
+    {
+        handleStateChanged(Time(), server, state);
+    }
+
+    void handleAddService(const string &server, const string &service, const string &/*fmt*/, bool iscmd, const vector<Description> &vec)
     {
         QStandardItem *item = AddServiceItem(server, service, iscmd);
-        const vector<Description> v = GetDescription(server, service);
-        AddDescription(item, v);
+        AddDescription(item, vec);
     }
 
@@ -382,8 +386,6 @@
     }
 
-    void handleAddDescription(const string &server, const string &service, const vector<Description> &vec)
-    {
-        const bool iscmd = IsCommand(server, service)==true;
-
+    void handleAddDescription(const string &server, const string &service, const vector<Description> &vec, bool iscmd)
+    {
         QStandardItem *item = AddServiceItem(server, service, iscmd);
         AddDescription(item, vec);
