Salome HOME
Image positioning by two points.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_OCCDisplayer.cxx
index 8be446e4555cf90efa0fb637b9aaec86989e9f9b..d1655f3c411ba05c8726579c0b87e5d4a8951283 100644 (file)
@@ -55,7 +55,7 @@ void HYDROGUI_OCCDisplayer::SetToUpdate( const HYDROData_SequenceOfObjects& theO
 
   for ( int i = 1, n = theObjs.Length(); i <= n; i++ )
   {
-    Handle(HYDROData_Object) anObj = theObjs.Value( i );
+    Handle(HYDROData_Entity) anObj = theObjs.Value( i );
     if( anObj.IsNull() )
       continue;
 
@@ -106,7 +106,7 @@ void HYDROGUI_OCCDisplayer::Update( const HYDROData_SequenceOfObjects& theObjs,
 
   for( int i = 1, n = theObjs.Length(); i <= n; i++ )
   {
-    const Handle(HYDROData_Object)& anObj = theObjs.Value( i );
+    const Handle(HYDROData_Entity)& anObj = theObjs.Value( i );
     if( anObj.IsNull() )
       anObjectsToErase.Append( anObj );
     else
@@ -128,7 +128,7 @@ void HYDROGUI_OCCDisplayer::Erase( const HYDROData_SequenceOfObjects& theObjs,
 
   for ( int i = 1, n = theObjs.Length(); i <= n; i++ )
   {
-    Handle(HYDROData_Object) anObj = theObjs.Value( i );
+    Handle(HYDROData_Entity) anObj = theObjs.Value( i );
     if( anObj.IsNull() )
       continue;
 
@@ -138,7 +138,7 @@ void HYDROGUI_OCCDisplayer::Erase( const HYDROData_SequenceOfObjects& theObjs,
 
 HYDROGUI_Shape* HYDROGUI_OCCDisplayer::createShape( const int                             theViewerId,
                                                     const Handle(AIS_InteractiveContext)& theContext,
-                                                    const Handle(HYDROData_Object)&       theObject )
+                                                    const Handle(HYDROData_Entity)&       theObject )
 {
   HYDROGUI_Shape* aResShape = NULL;
   if ( theContext.IsNull() || theObject.IsNull() )
@@ -147,6 +147,8 @@ HYDROGUI_Shape* HYDROGUI_OCCDisplayer::createShape( const int
   ObjectKind anObjectKind = theObject->GetKind();
   if ( anObjectKind != KIND_IMAGE &&
        anObjectKind != KIND_POLYLINE &&
+       anObjectKind != KIND_IMMERSIBLE_ZONE &&
+       anObjectKind != KIND_REGION &&
        anObjectKind != KIND_ZONE )
     return aResShape;
 
@@ -170,7 +172,7 @@ void HYDROGUI_OCCDisplayer::Display( const HYDROData_SequenceOfObjects& theObjs,
 
   for ( int i = 1, n = theObjs.Length(); i <= n; i++ )
   {
-    Handle(HYDROData_Object) anObj = theObjs.Value( i );
+    Handle(HYDROData_Entity) anObj = theObjs.Value( i );
     if ( anObj.IsNull() || anObj->IsRemoved() )
       continue;
 
@@ -200,7 +202,7 @@ void HYDROGUI_OCCDisplayer::Display( const HYDROData_SequenceOfObjects& theObjs,
       ::qobject_cast<OCCViewer_ViewWindow*>( aViewManager->getActiveView() );
     if ( aViewWindow )
     {
-      QApplication::processEvents(); //Process the draw events for viewer
+      //RKV: QApplication::processEvents(); //Process the draw events for viewer
       aViewWindow->onFitAll();
     }
   }
@@ -226,8 +228,8 @@ void HYDROGUI_OCCDisplayer::purgeObjects( const int theViewerId )
     if ( aPrsObj.IsNull() )
       continue;
 
-    Handle(HYDROData_Object) anOwnerObj = 
-      Handle(HYDROData_Object)::DownCast( aPrsObj->GetOwner() );
+    Handle(HYDROData_Entity) anOwnerObj = 
+      Handle(HYDROData_Entity)::DownCast( aPrsObj->GetOwner() );
     if ( !anOwnerObj.IsNull() && anOwnerObj->IsRemoved() )
       myModule->removeObjectShape( (size_t)aViewer, anOwnerObj );
   }