mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Merge pull request #4408 from birarda/master
let QMainWindow delete GLCanvas, just stop the QTimer instead
This commit is contained in:
commit
d59f9c85a3
3 changed files with 8 additions and 2 deletions
|
@ -604,8 +604,8 @@ Application::~Application() {
|
|||
|
||||
ModelEntityItem::cleanupLoadedAnimations();
|
||||
|
||||
delete _glWidget;
|
||||
_glWidget = NULL;
|
||||
// stop the glWidget frame timer so it doesn't call paintGL
|
||||
_glWidget->stopFrameTimer();
|
||||
|
||||
DependencyManager::destroy<AnimationCache>();
|
||||
DependencyManager::destroy<TextureCache>();
|
||||
|
|
|
@ -31,6 +31,10 @@ GLCanvas::GLCanvas() : QGLWidget(QGL::NoDepthBuffer | QGL::NoStencilBuffer),
|
|||
#endif
|
||||
}
|
||||
|
||||
void GLCanvas::stopFrameTimer() {
|
||||
_frameTimer.stop();
|
||||
}
|
||||
|
||||
bool GLCanvas::isThrottleRendering() const {
|
||||
return _throttleRendering || Application::getInstance()->getWindow()->isMinimized();
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@ class GLCanvas : public QGLWidget {
|
|||
|
||||
public:
|
||||
GLCanvas();
|
||||
|
||||
void stopFrameTimer();
|
||||
|
||||
bool isThrottleRendering() const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue