From: eap Date: Tue, 12 Mar 2013 13:46:11 +0000 (+0000) Subject: In OnEditDelete(), X-Git-Tag: pluginMGCleaner~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=37b13e00d42780dd45236f75cdbac6eddbc09918;p=modules%2Fsmesh.git In OnEditDelete(), + // Call mesh->Clear() to prevent loading mesh from file caused by hypotheses removal + ... --- diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 47f42b997..1e95346b6 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -1800,6 +1800,15 @@ } } + // Call mesh->Clear() to prevent loading mesh from file caused by hypotheses removal + for( It.Initialize( selected ); It.More(); It.Next()) // loop on selected IO's + { + Handle(SALOME_InteractiveObject) IObject = It.Value(); + SMESH::SMESH_Mesh_var mesh = SMESH::IObjectToInterface< SMESH::SMESH_Mesh >( IObject ); + if ( !mesh->_is_nil() ) + mesh->Clear(); + } + // Treat SO's in the list starting from the back aStudyBuilder->NewCommand(); // There is a transaction for ( ritSO = listSO.rbegin(); ritSO != listSO.rend(); ++ritSO )