Salome HOME
0020310: EDF 997 SMESH : Tell the mesh to pass through different points
authorptv <ptv@opencascade.com>
Tue, 15 Sep 2009 12:42:32 +0000 (12:42 +0000)
committerptv <ptv@opencascade.com>
Tue, 15 Sep 2009 12:42:32 +0000 (12:42 +0000)
Edit sub mesh with hypothesis, but without algos.
It is necessary tocheck is there are any comparing of strings as "char* == char*" but HOW?

src/SMESHGUI/SMESHGUI_MeshOp.cxx

index 2d40906ff759e162bd9c6abd41bb4b0f850fe1ab..32b21f7367cf1aa6fffb603a577890f8d531316a 100644 (file)
@@ -1332,7 +1332,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
         CORBA::String_var curHypType = curHyp->GetName();
         if ( !algoDeselectedByUser &&
              myObjHyps[ dim ][ type ].count() > 0 &&
-             curHypType == myObjHyps[ dim ][ type ].first().first->GetName())
+             !strcmp( curHypType, myObjHyps[ dim ][ type ].first().first->GetName()) )
         {
           HypothesisData* hypData = SMESH::GetHypothesisData( curHyp->GetName() );
           for (int i = 0; i < myAvailableHypData[ dim ][ Algo ].count(); ++i) {
@@ -1761,7 +1761,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
   {
     SMESH::SMESH_Hypothesis_var aHypVar = (*anIter).first;
     CORBA::String_var aName = aHypVar->GetName();
-    if ( !aHypVar->_is_nil() && aHypName == aName )
+    if ( !aHypVar->_is_nil() && !strcmp(aHypName.toLatin1().data(), aName) )
     {
       anAlgoVar = aHypVar;
       break;
@@ -1802,7 +1802,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
     {
       SMESH::SMESH_Hypothesis_var aHypVar = (*anIter).first;
       CORBA::String_var aName = aHypVar->GetName();
-      if ( !aHypVar->_is_nil() && aHypName == aName )
+      if ( !aHypVar->_is_nil() && !strcmp(aHypName.toLatin1().data(), aName) )
       {
         anAlgoVar = aHypVar;
         break;