]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
ZFitAll leads to black screen of OCC viewer during rotation if gradient background... porting_occt7_1_0_zfitall_obsolete
authornds <nds@opencascade.com>
Thu, 29 Dec 2016 11:00:14 +0000 (14:00 +0300)
committernds <nds@opencascade.com>
Thu, 29 Dec 2016 11:00:14 +0000 (14:00 +0300)
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/OCCViewer/OCCViewer_ViewWindow.cxx

index ee51e0b4e8af49ac216edf4e16373390b7c9d596..778c65b998032f959dff973d3cca21cd0220a97e 100755 (executable)
@@ -245,7 +245,9 @@ bool OCCViewer_ViewPort3d::syncronize( const OCCViewer_ViewPort3d* ref )
   /* update */
   tgtView->Update();
   tgtView->SetImmediateUpdate( Standard_True );
+#if OCC_VERSION_LARGE <= 0x06070100
   tgtView->ZFitAll();
+#endif
   return true;
 }
 
@@ -264,7 +266,9 @@ double OCCViewer_ViewPort3d::getZSize() const
 */
 void OCCViewer_ViewPort3d::setZSize( double zsize )
 {
+#if OCC_VERSION_LARGE <= 0x06070100
   myActiveView->SetZSize( zsize );
+#endif
   /*    if ( !myOrthoView.IsNull() )
         myOrthoView->SetZSize( zsize );
         if ( !myPerspView.IsNull() )
@@ -574,8 +578,8 @@ void OCCViewer_ViewPort3d::rotate( int x, int y,
 void OCCViewer_ViewPort3d::endRotation()
 {
   if ( !activeView().IsNull() ) {
-    activeView()->ZFitAll( 1.0 );
 #if OCC_VERSION_LARGE <= 0x06070100
+    activeView()->ZFitAll( 1.0 );
     activeView()->SetZSize( 0.0 );
 #endif
     activeView()->Update();
@@ -651,12 +655,12 @@ void OCCViewer_ViewPort3d::fitAll( bool keepScale, bool withZ, bool upd )
   
 #if OCC_VERSION_LARGE > 0x06070100
   activeView()->FitAll( margin, upd );
-  if(withZ)
-    activeView()->ZFitAll();
+  //if(withZ)
+  //  activeView()->ZFitAll();
 #else 
   activeView()->FitAll( margin, withZ, upd );
-#endif
   activeView()->SetZSize(0.);
+#endif
   emit vpTransformed( this );
 }
 
@@ -769,8 +773,8 @@ bool OCCViewer_ViewPort3d::synchronize( OCCViewer_ViewPort* view )
 #else
     aView3d->SetViewMapping( aRefView3d->ViewMapping() );
     aView3d->SetViewOrientation( aRefView3d->ViewOrientation() );
-#endif
     aView3d->ZFitAll();
+#endif
     aView3d->SetImmediateUpdate( Standard_True );
     aView3d->Update();
     blockSignals( blocked );
index 282daceb7307b6e168d801500c4a1a7b16d9689b..a3c5b58db8fc6f07f2a5d99874c3f49f857027b5 100644 (file)
@@ -406,7 +406,9 @@ bool OCCViewer_ViewWindow::eventFilter( QObject* watched, QEvent* e )
           int x1 = (int)( aEvent->x() + width()*delta/100 );
           int y1 = (int)( aEvent->y() + height()*delta/100 );
           myViewPort->zoom( x, y, x1, y1 );
+#if OCC_VERSION_LARGE <= 0x06070100
           myViewPort->getView()->ZFitAll();
+#endif
           emit vpTransformationFinished ( ZOOMVIEW );
         }
       }
@@ -1060,7 +1062,9 @@ void OCCViewer_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent)
 
   case PANVIEW:
   case ZOOMVIEW:
+#if OCC_VERSION_LARGE <= 0x06070100
     myViewPort->getView()->ZFitAll();
+#endif
     resetState();
     break;
 
@@ -3668,7 +3672,9 @@ void OCCViewer_ViewWindow::synchronize( SUIT_ViewWindow* theView )
 
   getViewPort()->setAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] );
 
+#if OCC_VERSION_LARGE <= 0x06070100
   aDestView->ZFitAll();
+#endif
   aDestView->SetImmediateUpdate( Standard_True );
   aDestView->Redraw();