]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
fix bug with algorithm and his hypothesis in case of new created study (not imported...
authorptv <ptv@opencascade.com>
Tue, 13 Jan 2009 13:04:50 +0000 (13:04 +0000)
committerptv <ptv@opencascade.com>
Tue, 13 Jan 2009 13:04:50 +0000 (13:04 +0000)
src/SMESH_I/SMESH_2smeshpy.cxx

index 91332d7ed64a2a7ffb110246567fe3d598e31d88..46997e2017a28fcc203bfb5a35d69e506c3a1640 100644 (file)
@@ -1368,6 +1368,8 @@ bool _pyHypothesis::Addition2Creation( const Handle(_pyCommand)& theCmd,
     algo = theGen->FindAlgo( myGeom, theMesh, this );
     if ( algo.IsNull() )
       return false;
+    // attach hypothesis creation command to be after algo creation command
+    // because it can be new created instance of algorithm
     algo->GetCreationCmd()->AddDependantCmd( theCmd );
   }
   myIsWrapped = true;
@@ -1386,10 +1388,10 @@ bool _pyHypothesis::Addition2Creation( const Handle(_pyCommand)& theCmd,
   }
   // set a new creation command
   GetCreationCmd()->Clear();
-  // set dependance between creation and addition to mesh
-  // SetCreationCmd( theCmd );
-  GetCreationCmd()->AddDependantCmd( theCmd );
-    
+  // replace creation command by wrapped instance
+  // please note, that hypothesis attaches to algo creation command (see upper)
+  SetCreationCmd( theCmd );
+  
 
   // clear commands setting arg values
   list < Handle(_pyCommand) >::iterator argCmd = myArgCommands.begin();