From: eap Date: Tue, 3 Sep 2013 09:42:04 +0000 (+0000) Subject: Bug: preview works correctly only once, other times preview shows the same X-Git-Tag: V7_3_0a1~171 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ab9af2744575f3a0b5c00c857782b76a1dc9c519;p=modules%2Fsmesh.git Bug: preview works correctly only once, other times preview shows the same as at the 1st time. Ensure clearing of tmp mesh --- diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 565312c64..3edcb167d 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -177,6 +177,10 @@ namespace MeshEditor_I { return _myMeshDS->AddNodeWithID(anElemNode->X(), anElemNode->Y(), anElemNode->Z(), anElemNode->GetID()); } + void RemoveAll() + { + GetMeshDS()->ClearMesh(); + } };// struct TPreviewMesh static SMESH_NodeSearcher * theNodeSearcher = 0; @@ -468,7 +472,7 @@ SMESH_MeshEditor_i::~SMESH_MeshEditor_i() void SMESH_MeshEditor_i::initData(bool deleteSearchers) { if ( myIsPreviewMode ) { - if ( myPreviewMesh ) myPreviewMesh->Clear(); + if ( myPreviewMesh ) myPreviewMesh->RemoveAll(); } else { if ( deleteSearchers )