Do not show a mesh when a group is created

Instead, only update a visible group accoding to a changed contents.
This commit is contained in:
eap 2014-08-07 15:35:00 +04:00
parent aff2cee17c
commit b178951ce4

View File

@ -1155,9 +1155,10 @@ bool SMESHGUI_GroupDlg::onApply()
if ( aMeshGroupSO ) if ( aMeshGroupSO )
{ {
if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) { if ( SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str()))
if ( isConversion ) { // need to reset TVisualObj and actor {
Handle(SALOME_InteractiveObject) anIO = anActor->getIO(); Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
if ( isConversion ) { // need to reset TVisualObj and actor
SMESH::RemoveVisualObjectWithActors( anIO->getEntry(), true ); SMESH::RemoveVisualObjectWithActors( anIO->getEntry(), true );
SMESH::Update( anIO,true); SMESH::Update( anIO,true);
myActorsList.clear(); myActorsList.clear();
@ -1183,12 +1184,14 @@ bool SMESHGUI_GroupDlg::onApply()
anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta ); break; anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta ); break;
break; break;
} }
// update a visible group accoding to a changed contents
if ( !isConversion && anActor->GetVisibility() )
SMESH::Update( anIO, true );
} }
} }
} }
SMESHGUI::Modified(); SMESHGUI::Modified();
mySMESHGUI->updateObjBrowser(true); mySMESHGUI->updateObjBrowser(true);
SMESH::UpdateView(); // asv: fix of BUG PAL5515
mySelectionMgr->clearSelected(); mySelectionMgr->clearSelected();
if( LightApp_Application* anApp = if( LightApp_Application* anApp =