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 5c2e918..2fcd2a6 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 3b9cd0b..253219d 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 32b472f..3082f70 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() )
               {