Salome HOME
23617: EDF 14133 - Complete Merge Nodes / Merge Elements operations
[modules/smesh.git] / src / SMESH / SMESH_MeshEditor.cxx
index 6ec53053c916f5bf669d6440e65e2d543ac442ac..81db6b65f296d5cd3ed12332810c2732bd98efcc 100644 (file)
@@ -10941,7 +10941,7 @@ void SMESH_MeshEditor::DoubleElements( const TIDSortedElemSet& theElements )
   }
   else
   {
-    type = (*theElements.begin())->GetType();
+    //type = (*theElements.begin())->GetType();
     elemIt = SMESHUtils::elemSetIterator( theElements );
   }
 
@@ -10956,7 +10956,8 @@ void SMESH_MeshEditor::DoubleElements( const TIDSortedElemSet& theElements )
   while ( elemIt->more() )
   {
     const SMDS_MeshElement* elem = elemIt->next();
-    if ( elem->GetType() != type || elem->isMarked() )
+    if (( type != SMDSAbs_All && elem->GetType() != type ) ||
+        ( elem->isMarked() ))
       continue;
 
     elemType.Init( elem, /*basicOnly=*/false );