Salome HOME
Additional minor fix of issue 0017431: unset the MODAL behavior for the 'Basic Proper...
[modules/geom.git] / src / GEOM / GEOM_PythonDump.cxx
index a3ff987bde2d2234fce5c3b84cf837c5f6a0dba1..14c84dc8baca1ab1d98ada7a3b402d7d9a7760db 100644 (file)
@@ -43,19 +43,12 @@ namespace GEOM
       TCollection_AsciiString aDescr;
       if ( myAppend )
         aDescr = myFunction->GetDescription() + "\n\t";
-      aDescr += (char *)myStream.str().c_str();
+      std::string aString = myStream.str();
+      aDescr += (char *)aString.c_str();
       myFunction->SetDescription( aDescr );
     }
   }
 
-//  TPythonDump::operator TCollection_AsciiString () const
-//  {
-//    if (myCounter == 1) {
-//      return TCollection_AsciiString ((char *)myStream.str().c_str());
-//    }
-//    return TCollection_AsciiString ();
-//  }
-
   TPythonDump& TPythonDump::operator<< (long int theArg)
   {
     myStream<<theArg;
@@ -124,7 +117,7 @@ namespace GEOM
     TDF_Tool::TagList(theObj1->GetEntry(), aTags1);
     TDF_Tool::TagList(theObj2->GetEntry(), aTags2);
     TColStd_ListIteratorOfListOfInteger aListIter1(aTags1), aListIter2(aTags2);
-    for (; aListIter1.More(); aListIter1.Next()) {
+    for (; aListIter1.More(); aListIter1.Next(), aListIter2.Next()) {
       if (!aListIter2.More())
         return theObj1; // anObj1 is stored under anObj2