Salome HOME
IPAL53915: Display Entity dialog does not work
authoreap <eap@opencascade.com>
Tue, 31 Jan 2017 14:28:41 +0000 (17:28 +0300)
committereap <eap@opencascade.com>
Tue, 31 Jan 2017 14:28:41 +0000 (17:28 +0300)
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_Object.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx

index 5c2e918ab00908321c1b5a94d495cea394842f48..2fcd2a67c600b0efbddeabafa12e77c9c70773f6 100644 (file)
@@ -1559,7 +1559,7 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation)
 
 void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
 {
-  myEntityState = eAllEntity;
+  myEntityState = eAllEntity; // entities present in my object
 
   if(!myVisualObj->GetNbEntities(SMDSAbs_0DElement)) {
     myEntityState &= ~e0DElements;
@@ -1605,7 +1605,7 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
 
   myBaseActor->myGeomFilter->SetInside(myEntityMode != myEntityState);
 
-  myEntityMode = theMode;
+  myEntityMode = theMode; // entities to show
 
   VTKViewer_ExtractUnstructuredGrid* aFilter = myBaseActor->GetExtractUnstructuredGrid();
   aFilter->ClearRegisteredCellsWithType();
@@ -1983,9 +1983,9 @@ void SMESH_ActorDef::Update()
     SetFacesOriented(myIsFacesOriented);
   }
 
-  if(myVisualObj->GetEntitiesFlag()) {
-    myEntityMode |= myVisualObj->GetEntitiesState();
-  }
+  // if(myVisualObj->GetEntitiesFlag()) { IPAL53915
+  //   myEntityMode |= myVisualObj->GetEntitiesState();
+  // }
 
   SetEntityMode(GetEntityMode());
   SetVisibility(GetVisibility());
index 3b9cd0b8ce28e9ad97222dccbb9caa0b1c4de46f..253219d0b2b565a1466f7d4eb66823d0e3259ec0 100644 (file)
@@ -32,6 +32,8 @@
 #include "SMDS_Mesh.hxx"
 #include "SMDS_MeshCell.hxx"
 #include "SMDS_PolyhedralVolumeOfNodes.hxx"
+#include "SMESHDS_Mesh.hxx"
+#include "SMESHDS_Script.hxx"
 #include "SMESH_Actor.h"
 #include "SMESH_ControlsDef.hxx"
 
@@ -54,7 +56,7 @@
 #include <stdexcept>
 #include <set>
 
-#include "utilities.h"
+#include <utilities.h>
 
 using namespace std;
 
@@ -283,6 +285,8 @@ void SMESH_VisualObjDef::buildPrs(bool buildGrid)
       NulData(); // detach from the SMDS grid to allow immediate memory de-allocation in compactMesh()
       if ( MYDEBUG ) MESSAGE("*** buildPrs ==> compactMesh!");
       GetMesh()->compactMesh();
+      if ( SMESHDS_Mesh* m = dynamic_cast<SMESHDS_Mesh*>( GetMesh() )) // IPAL53915
+        m->GetScript()->SetModified(false); // drop IsModified set in compactMesh()
     }
     vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
     updateEntitiesFlags();
index 32b472ff6d3545b5dde30bb5e3e154d896dfb7cb..3082f70e1bdd75380f4d0f8d87a87d09e01f72ff 100644 (file)
@@ -1010,11 +1010,10 @@ void SMESHGUI_BaseComputeOp::computeMesh()
               Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject
                 ( (*anIter).second->GetID().c_str(), "SMESH", (*anIter).second->GetName().c_str() );
               SMESH::Update(anIO, toDisplay);
-             if( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() ) ) {
-               if( vtkWnd->getRenderer() ){
-                 vtkWnd->getRenderer()->ResetCameraClippingRange();
-               }
-             }
+
+              if ( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() ))
+                if ( vtkWnd->getRenderer() )
+                  vtkWnd->getRenderer()->ResetCameraClippingRange();
 
               if ( limitExceeded && !aMesh->_is_nil() )
               {