From: eap Date: Thu, 26 Jan 2012 15:57:56 +0000 (+0000) Subject: 0021338: EDF 1926 SMESH: New controls and filters X-Git-Tag: V6_5_0a1~169 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da61389f82fbe9af224568dbc121ae92833446cf;p=modules%2Fsmesh.git 0021338: EDF 1926 SMESH: New controls and filters Correctly set mesh modified at transformations --- diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index ee6499cb0..ac3973702 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -3003,11 +3003,19 @@ SMESH_MeshEditor_i::mirror(TIDSortedElemSet & theElements, anEditor.Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh); if(theCopy || myPreviewMode) - storeResult(anEditor); - else + storeResult(anEditor); // store preview data or new elements + + if ( !myPreviewMode ) { - myMesh->SetIsModified( true ); - myMesh->GetMeshDS()->Modified(); + if ( theTargetMesh ) + { + theTargetMesh->GetMeshDS()->Modified(); + } + else + { + myMesh->GetMeshDS()->Modified(); + myMesh->SetIsModified( true ); + } } return theMakeGroups ? getGroups(groupIds.get()) : 0; } @@ -3259,10 +3267,18 @@ SMESH_MeshEditor_i::translate(TIDSortedElemSet & theElements, if(theCopy || myPreviewMode) storeResult(anEditor); - else + + if ( !myPreviewMode ) { - myMesh->GetMeshDS()->Modified(); - myMesh->SetIsModified( true ); + if ( theTargetMesh ) + { + theTargetMesh->GetMeshDS()->Modified(); + } + else + { + myMesh->GetMeshDS()->Modified(); + myMesh->SetIsModified( true ); + } } return theMakeGroups ? getGroups(groupIds.get()) : 0; @@ -3501,10 +3517,18 @@ SMESH_MeshEditor_i::rotate(TIDSortedElemSet & theElements, if(theCopy || myPreviewMode) storeResult(anEditor); - else + + if ( !myPreviewMode ) { - myMesh->GetMeshDS()->Modified(); - myMesh->SetIsModified( true ); + if ( theTargetMesh ) + { + theTargetMesh->GetMeshDS()->Modified(); + } + else + { + myMesh->GetMeshDS()->Modified(); + myMesh->SetIsModified( true ); + } } return theMakeGroups ? getGroups(groupIds.get()) : 0; @@ -3772,11 +3796,20 @@ SMESH_MeshEditor_i::scale(SMESH::SMESH_IDSource_ptr theObject, if(theCopy || myPreviewMode ) storeResult(anEditor); - else + + if ( !myPreviewMode ) { - myMesh->GetMeshDS()->Modified(); - myMesh->SetIsModified( true ); + if ( theTargetMesh ) + { + theTargetMesh->GetMeshDS()->Modified(); + } + else + { + myMesh->GetMeshDS()->Modified(); + myMesh->SetIsModified( true ); + } } + return theMakeGroups ? getGroups(groupIds.get()) : 0; } @@ -4121,6 +4154,8 @@ void SMESH_MeshEditor_i::MergeEqualElements() ::SMESH_MeshEditor anEditor( myMesh ); anEditor.MergeEqualElements(); + myMesh->GetMeshDS()->Modified(); + TPythonDump() << this << ".MergeEqualElements()"; }