Salome HOME
Porting to new OCCT version
[modules/geom.git] / src / GEOM / GEOM_Engine.cxx
index bbd3f5589c29b8a288f76993aaa1846d73537691..9376296382bacaa3ab1f228bd02caf8c2ae262be 100644 (file)
@@ -82,6 +82,7 @@
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
+using namespace std;
 #else
 static int MYDEBUG = 0;
 #endif
@@ -1834,6 +1835,8 @@ TCollection_AsciiString GetPublishCommands
 
   if (!thePublished.count(theTag)) {
     // This object is not published yet.
+    thePublished.insert(theTag);
+
     std::map< int, TCollection_AsciiString >::const_iterator anIt =
       theEntryToCmdMap.find(theTag);
 
@@ -1842,7 +1845,7 @@ TCollection_AsciiString GetPublishCommands
       TIntToListIntMap::const_iterator aRefIt = theMapRefs.find(theTag);
 
       if (aRefIt != theMapRefs.end()) {
-        // Recursively publish all references.
+        // Recursively publish all references.         
         std::list< int >::const_iterator aRefTagIt = aRefIt->second.begin();
 
         for(; aRefTagIt != aRefIt->second.end(); ++aRefTagIt) {
@@ -1856,8 +1859,6 @@ TCollection_AsciiString GetPublishCommands
       // Add the object command.
       aResult += anIt->second;
     }
-
-    thePublished.insert(theTag);
   }
 
   return aResult;