mirror of
https://github.com/overte-org/overte.git
synced 2025-07-29 02:39:59 +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();
|
ModelEntityItem::cleanupLoadedAnimations();
|
||||||
|
|
||||||
delete _glWidget;
|
// stop the glWidget frame timer so it doesn't call paintGL
|
||||||
_glWidget = NULL;
|
_glWidget->stopFrameTimer();
|
||||||
|
|
||||||
DependencyManager::destroy<AnimationCache>();
|
DependencyManager::destroy<AnimationCache>();
|
||||||
DependencyManager::destroy<TextureCache>();
|
DependencyManager::destroy<TextureCache>();
|
||||||
|
|
|
@ -31,6 +31,10 @@ GLCanvas::GLCanvas() : QGLWidget(QGL::NoDepthBuffer | QGL::NoStencilBuffer),
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GLCanvas::stopFrameTimer() {
|
||||||
|
_frameTimer.stop();
|
||||||
|
}
|
||||||
|
|
||||||
bool GLCanvas::isThrottleRendering() const {
|
bool GLCanvas::isThrottleRendering() const {
|
||||||
return _throttleRendering || Application::getInstance()->getWindow()->isMinimized();
|
return _throttleRendering || Application::getInstance()->getWindow()->isMinimized();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,8 @@ class GLCanvas : public QGLWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GLCanvas();
|
GLCanvas();
|
||||||
|
|
||||||
|
void stopFrameTimer();
|
||||||
|
|
||||||
bool isThrottleRendering() const;
|
bool isThrottleRendering() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue