X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FLightApp%2FLightApp_Application.cxx;h=d716f89ea11ce4004e56fbfd2a32a1fb43240d9f;hb=0b0bb0580ebbe9e045742e50c9efac1b99249456;hp=3fc89457e44f16256717d3111ac913bc1753835e;hpb=9912133bfc94786da1b81666bf944de14d29cd77;p=modules%2Fgui.git diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 3fc89457e..d716f89ea 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -1150,11 +1150,10 @@ void LightApp_Application::onStudyClosed( SUIT_Study* ) { emit studyClosed(); - activateModule( "" ); + // Bug 10396: clear selection + mySelMgr->clearSelected(); - // Bug 10396: remove all selectors - delete mySelMgr; - mySelMgr = new LightApp_SelectionMgr( this ); + activateModule( "" ); saveWindowsGeometry(); } @@ -1609,7 +1608,11 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString int u = resMgr->integerValue( sec, "iso_number_u" ); int v = resMgr->integerValue( sec, "iso_number_v" ); for ( QPtrListIterator it( lst ); it.current(); ++it ) - ((OCCViewer_Viewer*)it.current())->setIsos( u, v ); + { + OCCViewer_ViewManager* mgr = dynamic_cast( it.current() ); + if( mgr && mgr->getOCCViewer() ) + mgr->getOCCViewer()->setIsos( u, v ); + } } if( sec=="ObjectBrowser" ) @@ -1855,3 +1858,12 @@ void LightApp_Application::onWCDestroyed( QObject* ob ) break; } } + +/*! redefined to remove view manager from memory */ +void LightApp_Application::removeViewManager( SUIT_ViewManager* vm ) +{ + disconnect( vm, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ), + this, SLOT( onCloseView( SUIT_ViewManager* ) ) ); + STD_Application::removeViewManager( vm ); + delete vm; +}