mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
54353: Mesh group is not updated in VTK
This commit is contained in:
parent
f7712f9c03
commit
eda06d81d6
@ -247,15 +247,13 @@ void SMESHGUI_RemoveElementsDlg::ClickOnApply()
|
||||
|
||||
} catch (const SALOME::SALOME_Exception& S_ex) {
|
||||
SalomeApp_Tools::QtCatchCorbaException(S_ex);
|
||||
myEditCurrentArgument->clear();
|
||||
} catch (...){
|
||||
myEditCurrentArgument->clear();
|
||||
} catch (...) {
|
||||
}
|
||||
|
||||
myEditCurrentArgument->clear();
|
||||
if (aResult) {
|
||||
myEditCurrentArgument->clear();
|
||||
mySelector->ClearIndex();
|
||||
SMESH::UpdateView();
|
||||
SMESH::UpdateView( /*withChildrenOfSelected=*/true );
|
||||
SMESHGUI::Modified();
|
||||
}
|
||||
}
|
||||
|
@ -794,12 +794,13 @@ namespace SMESH
|
||||
return false;
|
||||
}
|
||||
|
||||
void UpdateView(){
|
||||
void UpdateView( bool withChildrenOfSelected )
|
||||
{
|
||||
if ( SVTK_ViewWindow* aWnd = SMESH::GetCurrentVtkView()) {
|
||||
LightApp_SelectionMgr* mgr = SMESHGUI::selectionMgr();
|
||||
SALOME_ListIO selected; mgr->selectedObjects( selected );
|
||||
|
||||
if( selected.Extent() == 0){
|
||||
if ( selected.Extent() == 0 ) {
|
||||
vtkRenderer* aRenderer = aWnd->getRenderer();
|
||||
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
|
||||
vtkActorCollection *aCollection = aCopy.GetActors();
|
||||
@ -811,12 +812,36 @@ namespace SMESH
|
||||
break; // avoid multiple warinings if visu failed
|
||||
}
|
||||
}
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
SALOME_ListIteratorOfListIO anIter( selected );
|
||||
for( ; anIter.More(); anIter.Next()){
|
||||
for( ; anIter.More(); anIter.Next())
|
||||
{
|
||||
Handle(SALOME_InteractiveObject) anIO = anIter.Value();
|
||||
if ( !Update(anIO,true) )
|
||||
if ( !Update( anIO, true ))
|
||||
break; // avoid multiple warinings if visu failed
|
||||
|
||||
if ( withChildrenOfSelected ) // update all visible children
|
||||
{
|
||||
QString aFatherID = anIO->getEntry();
|
||||
vtkRenderer* aRenderer = aWnd->getRenderer();
|
||||
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
|
||||
vtkActorCollection *aCollection = aCopy.GetActors();
|
||||
aCollection->InitTraversal();
|
||||
while ( vtkActor *anAct = aCollection->GetNextActor() ) {
|
||||
if ( SMESH_Actor *anActor = dynamic_cast<SMESH_Actor*>( anAct )) {
|
||||
if ( anActor->hasIO() && anActor->GetVisibility() )
|
||||
{
|
||||
QString aChildID = anActor->getIO()->getEntry();
|
||||
if ( aChildID.size() > aFatherID.size() &&
|
||||
aChildID.startsWith( aFatherID ))
|
||||
if ( ! Update( anActor->getIO(), true ))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RepaintCurrentView();
|
||||
|
@ -120,7 +120,7 @@ SMESHGUI_EXPORT
|
||||
bool UpdateView( EDisplaing, const char* = "" );
|
||||
|
||||
SMESHGUI_EXPORT
|
||||
void UpdateView();
|
||||
void UpdateView( bool withChildrenOfSelected = false );
|
||||
|
||||
SMESHGUI_EXPORT
|
||||
bool UpdateNulData( const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay);
|
||||
|
Loading…
Reference in New Issue
Block a user