23615: EDF 17317 - Fit All when display one mesh

Pb: no FitAll at 1st mesh compute
This commit is contained in:
eap 2018-12-05 14:55:28 +03:00
parent 7f7311ca93
commit a18e579603
3 changed files with 13 additions and 14 deletions

View 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 );
}

View 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() )

View 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 );