Salome HOME
22784: EDF 8824 GHS3DPLUGIN: SetEnforcedVertexNamedWithGroup() does not add an extra...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshOp.cxx
index 1fc82405f9f21577c7432ba1b2b38486c70ee275..8c1813f5636753b9da8cf4fa6521e4c69c2edf31 100644 (file)
@@ -1555,7 +1555,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
         hypIndex = this->find( curHyp, myExistingHyps[ dim ][ type ]);
       else
         hypIndex = -1;
         hypIndex = this->find( curHyp, myExistingHyps[ dim ][ type ]);
       else
         hypIndex = -1;
-      if ( !isSubmesh && hypIndex < 0 && anExisting.count() == 1 ) {
+      if ( !isSubmesh && myToCreate && hypIndex < 0 && anExisting.count() == 1 ) {
         // none is yet selected => select the sole existing if it is not optional
         CORBA::String_var hypTypeName = myExistingHyps[ dim ][ type ].first().first->GetName();
         bool isOptional = true;
         // none is yet selected => select the sole existing if it is not optional
         CORBA::String_var hypTypeName = myExistingHyps[ dim ][ type ].first().first->GetName();
         bool isOptional = true;