-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include <QPaintEvent>
#include <QResizeEvent>
#include <QApplication>
+#include <QTimer>
-#include <Visual3d_View.hxx>
-#include <V3d_Viewer.hxx>
+#if OCC_VERSION_MAJOR < 7
+ #include <Visual3d_View.hxx>
+#endif
#if OCC_VERSION_LARGE > 0x06070100
#include <V3d_View.hxx>
#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;
#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 ]
*/