mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-25 04:50:33 +05:00
Fight memory leaks
This commit is contained in:
parent
3c1414974e
commit
62283977ac
@ -67,7 +67,7 @@ void DependencyTree_ViewModel::onShowSelected()
|
|||||||
aSelMgr->selectedObjects(aSelList);
|
aSelMgr->selectedObjects(aSelList);
|
||||||
|
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
||||||
GEOM_Displayer* disp = new GEOM_Displayer( appStudy );
|
GEOM_Displayer disp( appStudy );
|
||||||
|
|
||||||
OCCViewer_ViewManager* anOCCVM = ( OCCViewer_ViewManager* ) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
|
OCCViewer_ViewManager* anOCCVM = ( OCCViewer_ViewManager* ) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ void DependencyTree_ViewModel::onShowSelected()
|
|||||||
if ( SALOME_View* viewFrame = dynamic_cast<SALOME_View*>( viewModel ) ) {
|
if ( SALOME_View* viewFrame = dynamic_cast<SALOME_View*>( viewModel ) ) {
|
||||||
SALOME_ListIteratorOfListIO Iter( aSelList );
|
SALOME_ListIteratorOfListIO Iter( aSelList );
|
||||||
for ( ; Iter.More(); Iter.Next() )
|
for ( ; Iter.More(); Iter.Next() )
|
||||||
disp->Display( Iter.Value(), false, viewFrame );
|
disp.Display( Iter.Value(), false, viewFrame );
|
||||||
viewFrame->Repaint();
|
viewFrame->Repaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,16 +97,16 @@ void DependencyTree_ViewModel::onShowOnlySelected()
|
|||||||
aSelMgr->selectedObjects( aSelList );
|
aSelMgr->selectedObjects( aSelList );
|
||||||
|
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
||||||
GEOM_Displayer* disp = new GEOM_Displayer( appStudy );
|
GEOM_Displayer disp( appStudy );
|
||||||
|
|
||||||
OCCViewer_ViewManager* anOCCVM = (OCCViewer_ViewManager*) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
|
OCCViewer_ViewManager* anOCCVM = (OCCViewer_ViewManager*) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
|
||||||
|
|
||||||
if ( SUIT_ViewModel* viewModel = anOCCVM->getViewModel() ) {
|
if ( SUIT_ViewModel* viewModel = anOCCVM->getViewModel() ) {
|
||||||
if ( SALOME_View* viewFrame = dynamic_cast<SALOME_View*>( viewModel ) ) {
|
if ( SALOME_View* viewFrame = dynamic_cast<SALOME_View*>( viewModel ) ) {
|
||||||
disp->EraseAll( true, false, viewFrame );
|
disp.EraseAll( true, false, viewFrame );
|
||||||
SALOME_ListIteratorOfListIO Iter( aSelList );
|
SALOME_ListIteratorOfListIO Iter( aSelList );
|
||||||
for ( ; Iter.More(); Iter.Next() )
|
for ( ; Iter.More(); Iter.Next() )
|
||||||
disp->Display( Iter.Value(), false, viewFrame );
|
disp.Display( Iter.Value(), false, viewFrame );
|
||||||
viewFrame->Repaint();
|
viewFrame->Repaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user