From 37b13e00d42780dd45236f75cdbac6eddbc09918 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 12 Mar 2013 13:46:11 +0000 Subject: [PATCH] In OnEditDelete(), + // Call mesh->Clear() to prevent loading mesh from file caused by hypotheses removal + ... --- src/SMESHGUI/SMESHGUI.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ) -- 2.39.2