From: asl Date: Tue, 15 Nov 2005 07:27:54 +0000 (+0000) Subject: PAL10328 - crash if user try to change number of isolines in OCC and apply changes X-Git-Tag: V3_1_0a3~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=233152eb5cb05a1b296bdb96bbd6b3133128770f;p=modules%2Fgui.git PAL10328 - crash if user try to change number of isolines in OCC and apply changes --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 19d6fc62e..0ba2a8bac 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -1610,7 +1610,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" )