]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
PAL10328 - crash if user try to change number of isolines in OCC and apply changes
authorasl <asl@opencascade.com>
Tue, 15 Nov 2005 07:27:54 +0000 (07:27 +0000)
committerasl <asl@opencascade.com>
Tue, 15 Nov 2005 07:27:54 +0000 (07:27 +0000)
src/LightApp/LightApp_Application.cxx

index 19d6fc62ed96320db44eaf1614938853eb1ae0e0..0ba2a8bac43428ab6b85784b799f3da49283b2c3 100644 (file)
@@ -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<SUIT_ViewManager> it( lst ); it.current(); ++it )
-      ((OCCViewer_Viewer*)it.current())->setIsos( u, v );
+    {
+      OCCViewer_ViewManager* mgr = dynamic_cast<OCCViewer_ViewManager*>( it.current() );
+      if( mgr && mgr->getOCCViewer() )
+       mgr->getOCCViewer()->setIsos( u, v );
+    }
   }
 
   if( sec=="ObjectBrowser" )