From a18e5796031d37bccc1fc0a4b0120555c2108a72 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 5 Dec 2018 14:55:28 +0300 Subject: [PATCH] 23615: EDF 17317 - Fit All when display one mesh Pb: no FitAll at 1st mesh compute --- src/SMESHGUI/SMESHGUI.cxx | 14 +++++++------- src/SMESHGUI/SMESHGUI_ComputeDlg.cxx | 11 +++++------ src/SMESHGUI/SMESHGUI_VTKUtils.cxx | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index a2b1e7425..a5dc528c2 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -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 ); } diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index a40bac0d4..ac325789f 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -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() ) diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index 52f969ef1..a706037bd 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -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 ); -- 2.39.2