Salome HOME
fix of comment
[modules/smesh.git] / src / SMESH_I / SMESH_2smeshpy.cxx
index 28bc3cfd429bf33678e1ce74f214607189805428..fe4fc0c152f59d4fd7a8c34bd063c0ee506a1eaa 100644 (file)
@@ -1510,7 +1510,7 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
          method == "ExportToMEDX" ) { // ExportToMEDX() --> ExportMED()
       theCommand->SetMethod( "ExportMED" );
     }
-    else if ( method == "ExportCGNS" )
+    else if ( method == "ExportCGNS" || method == "ExportGMF" )
     { // ExportCGNS(part, ...) -> ExportCGNS(..., part)
       _pyID partID = theCommand->GetArg( 1 );
       int nbArgs = theCommand->GetNbArgs();
@@ -1563,9 +1563,11 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
         if ( sameHyp )
         {
           addCmd = *cmd;
-          addCmd->Clear();
-          theCommand->Clear();
-          cmd = addHypCmds.erase( cmd );
+          cmd    = addHypCmds.erase( cmd );
+          if ( !theGen->IsToKeepAllCommands() ) {
+            addCmd->Clear();
+            theCommand->Clear();
+          }
         }
         else
         {
@@ -1574,7 +1576,7 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
       }
     }
     Handle(_pyHypothesis) hyp = theGen->FindHyp( hypID );
-    if ( addCmd.IsNull() && !hypID.IsEmpty() ) { // hypo addition already wrapped
+    if ( !theCommand->IsEmpty() && !hypID.IsEmpty() ) {
       // RemoveHypothesis(geom, hyp) --> RemoveHypothesis( hyp, geom=0 )
       _pyID geom = theCommand->GetArg( 1 );
       theCommand->RemoveArgs();