virtual void setCenter( int, int ) = 0;
virtual void fitRect( const QRect& ) = 0;
virtual void zoom( int, int, int, int ) = 0;
- virtual void fitAll( bool keepScale = false, bool withZ = true ) = 0;
+ virtual void fitAll( bool keepScale = false, bool withZ = true, bool upd = true ) = 0;
// POPUP
// void onCreatePopup( QPopupMenu* );
/*!
Fits all objects in view. [ virtual protected ]
*/
-void OCCViewer_ViewPort3d::fitAll( bool keepScale, bool withZ )
+void OCCViewer_ViewPort3d::fitAll( bool keepScale, bool withZ, bool upd )
{
if ( activeView().IsNull() )
- return;
-
+ return;
- if ( keepScale )
- myScale = activeView()->Scale();
- Standard_Real margin = 0.01;
- activeView()->FitAll( margin, withZ );
+ if ( keepScale )
+ myScale = activeView()->Scale();
-// double zsize = getZSize();
-// setZSize( zsize );
+ Standard_Real margin = 0.01;
+ activeView()->FitAll( margin, withZ, upd );
}
/*!
virtual void setCenter( int , int );
virtual void fitRect( const QRect& );
virtual void zoom( int, int, int, int );
- virtual void fitAll( bool keepScale = false, bool withZ = true );
+ virtual void fitAll( bool keepScale = false, bool withZ = true, bool upd = true );
void startRotation( int, int );
void rotate( int, int );
void OCCViewer_ViewWindow::onResetView()
{
emit vpTransformationStarted( RESETVIEW );
- myViewPort->getView()->Reset();
- myViewPort->fitAll();
+ bool upd = myViewPort->getView()->SetImmediateUpdate( false );
+ myViewPort->getView()->Reset( false );
+ myViewPort->fitAll( false, true, false );
+ myViewPort->getView()->SetImmediateUpdate( upd );
+ myViewPort->getView()->Update();
}
//****************************************************************