mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Avoid duplicate draw messages.
This commit is contained in:
parent
d95d0ac68a
commit
08631abe78
2 changed files with 7 additions and 2 deletions
|
@ -20,9 +20,9 @@ void lcGLWidget::MakeCurrent()
|
|||
|
||||
void lcGLWidget::Redraw()
|
||||
{
|
||||
QGLWidget* Widget = (QGLWidget*)mWidget;
|
||||
lcQGLWidget* Widget = (lcQGLWidget*)mWidget;
|
||||
|
||||
QTimer::singleShot(0, Widget, SLOT(updateGL()));
|
||||
Widget->mUpdateTimer.start(0);
|
||||
}
|
||||
|
||||
void* lcGLWidget::GetExtensionAddress(const char* FunctionName)
|
||||
|
@ -119,6 +119,9 @@ lcQGLWidget::lcQGLWidget(QWidget *parent, lcQGLWidget *share, lcGLWidget *owner,
|
|||
widget = owner;
|
||||
widget->mWidget = this;
|
||||
|
||||
mUpdateTimer.setSingleShot(true);
|
||||
connect(&mUpdateTimer, SIGNAL(timeout()), this, SLOT(updateGL()));
|
||||
|
||||
widget->MakeCurrent();
|
||||
GL_InitializeSharedExtensions(widget);
|
||||
widget->OnInitialUpdate();
|
||||
|
|
|
@ -25,6 +25,8 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
QTimer mUpdateTimer;
|
||||
|
||||
protected:
|
||||
void initializeGL();
|
||||
void resizeGL(int x, int h);
|
||||
|
|
Loading…
Reference in a new issue