X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FOCCViewer%2FOCCViewer_ViewPort3d.cxx;h=4a2cb3a222ceb4af644dd3845a939e90e2b21128;hb=5cdb60de088efffeabe9ac76120e15d8d6334210;hp=b0ba526d440ae4db77d3cfc0cc9e2074180b359d;hpb=45ee4bcf1d6a7d12b9525e4cefe42ef91b0dbe64;p=modules%2Fgui.git diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index b0ba526d4..4a2cb3a22 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -38,9 +38,11 @@ #include #include #include +#include -#include -#include +#if OCC_VERSION_MAJOR < 7 + #include +#endif #if OCC_VERSION_LARGE > 0x06070100 #include @@ -595,9 +597,14 @@ void OCCViewer_ViewPort3d::paintEvent( QPaintEvent* e ) #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) QApplication::syncX(); #endif - QRect rc = e->rect(); - if ( !myPaintersRedrawing ) + if ( !myPaintersRedrawing ) { +#if OCC_VERSION_MAJOR < 7 + QRect rc = e->rect(); activeView()->Redraw( rc.x(), rc.y(), rc.width(), rc.height() ); +#else + activeView()->Redraw(); +#endif + } } OCCViewer_ViewPort::paintEvent( e ); myBusy = false; @@ -616,21 +623,19 @@ void OCCViewer_ViewPort3d::resizeEvent( QResizeEvent* e ) #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) QApplication::syncX(); #endif - if ( !activeView().IsNull() ) - activeView()->MustBeResized(); + QTimer::singleShot( 0, this, SLOT( repaintViewAfterMove() ) ); } /*! Moved the viewport */ -/* void OCCViewer_ViewPort3d::repaintViewAfterMove( ) { if ( !activeView().IsNull() ){ activeView()->MustBeResized(); } } -*/ + /*! Fits all objects in view. [ virtual protected ] */