#include <QPaintEvent>
#include <QResizeEvent>
#include <QApplication>
+#include <QTimer>
#if OCC_VERSION_MAJOR < 7
#include <Visual3d_View.hxx>
#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 ]
*/
void showStaticTrihedron( bool );
- //void repaintViewAfterMove( );
-
void setDefaultCursor( Qt::CursorShape theCursorShape );
QCursor* getDefaultCursor() const;
public slots:
virtual bool synchronize( OCCViewer_ViewPort* );
+private slots:
+ void repaintViewAfterMove();
+
protected:
// EVENTS
virtual void paintEvent( QPaintEvent* );