Salome HOME
23615: EDF 17317 - Fit All when display one mesh
authoreap <eap@opencascade.com>
Wed, 5 Dec 2018 11:55:28 +0000 (14:55 +0300)
committereap <eap@opencascade.com>
Wed, 5 Dec 2018 11:55:28 +0000 (14:55 +0300)
  Pb: no FitAll at 1st mesh compute

src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_VTKUtils.cxx

index a2b1e74256e852b07010a9f26afcb4327985be12..a5dc528c275cefb88e646ee7dc0ddaec6ae1975b 100644 (file)
@@ -5474,13 +5474,13 @@ void SMESHGUI::preferencesChanged( const QString& sect, const QString& name )
     std::string aWarning;
     SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this);
 
-    if ( name== "selection_object_color" ||
-         name=="selection_element_color" ||
-         name==        "highlight_color" ||
-         name=="selection_precision_node"    ||
-         name=="selection_precision_element" ||
-         name=="selection_precision_object"   ||
-         name=="selection_increment")
+    if ( name ==  "selection_object_color" ||
+         name == "selection_element_color" ||
+         name ==         "highlight_color" ||
+         name == "selection_precision_node"    ||
+         name == "selection_precision_element" ||
+         name == "selection_precision_object"  ||
+         name == "selection_increment")
     {
       SMESH::UpdateSelectionProp( this );
     }
index a40bac0d4053ce841deac240e6f86ad10f518b22..ac325789ffd39033e5fb0ab005496c7cf41b3997 100644 (file)
@@ -988,21 +988,20 @@ void SMESHGUI_BaseComputeOp::computeMesh()
             try {
               OCC_CATCH_SIGNALS;
               bool toDisplay = false;
+              std::string entry = (*anIter).second->GetID();
               if ( !aMesh->_is_nil() ) // display only a mesh
               {
                 toDisplay = true;
                 SMESH_Actor *anActor = SMESH::FindActorByObject( aMesh );
-                if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetID().c_str(),
-                                                              /*clearLog =*/ true );
+                if ( !anActor ) anActor = SMESH::CreateActor( entry.c_str(), /*clearLog =*/true );
                 if ( anActor ) // actor is not created for an empty mesh
                 {
                   anActor->SetEntityMode( entities );
-                  SMESH::DisplayActor( SMESH::GetActiveWindow(), anActor );
+                  //SMESH::DisplayActor( SMESH::GetActiveWindow(), anActor ); -- 23615
                 }
               }
-              Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject
-                ( (*anIter).second->GetID().c_str(), "SMESH", (*anIter).second->GetName().c_str() );
-              SMESH::Update(anIO, toDisplay);
+              if ( toDisplay )
+                SMESH::UpdateView( SMESH::eDisplay, entry.c_str() );
 
               if ( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() ))
                 if ( vtkWnd->getRenderer() )
index 52f969ef19cba14463dc933c41d145c72e4db609..a706037bd97b30321e412ceb40252b4a20d5abe1 100644 (file)
@@ -896,7 +896,7 @@ namespace SMESH
     SMESH_ActorProps::props()->reset();
 
     QColor
-      aHiColor = mgr->colorValue( "SMESH", "selection_object_color", Qt::white ),
+      //aHiColor = mgr->colorValue( "SMESH", "selection_object_color", Qt::white ),
       aSelColor = mgr->colorValue( "SMESH", "selection_element_color", Qt::yellow ),
       aPreColor = mgr->colorValue( "SMESH", "highlight_color", Qt::cyan );