From 96cd6bc12cd606154ce69889b94043c0a658fdc3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 5 Oct 2016 22:49:02 +0200 Subject: api, cv, gui, pose-widget: remove window visibility check Causes freezes on multiple displays. Reported and tested in realtime by: @kzfr --- pose-widget/glwidget.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'pose-widget/glwidget.cpp') diff --git a/pose-widget/glwidget.cpp b/pose-widget/glwidget.cpp index 0aa06350..8e7784ed 100644 --- a/pose-widget/glwidget.cpp +++ b/pose-widget/glwidget.cpp @@ -6,7 +6,6 @@ */ #include "glwidget.h" -#include "api/is-window-visible.hpp" #include "compat/util.hpp" #include #include @@ -15,20 +14,20 @@ #include -GLWidget::GLWidget(QWidget *parent) : QWidget(parent), visible(true) +GLWidget::GLWidget(QWidget *parent) : QWidget(parent) { Q_INIT_RESOURCE(posewidget); front = QImage(QString(":/images/side1.png")); back = QImage(QString(":/images/side6.png")); - rotateBy_real(0, 0, 0, 0, 0, 0); + rotateBy(0, 0, 0, 0, 0, 0); } GLWidget::~GLWidget() { } -void GLWidget::paintEvent (QPaintEvent * event) +void GLWidget::paintEvent(QPaintEvent * event) { QPainter p(this); project_quad_texture(); @@ -36,18 +35,6 @@ void GLWidget::paintEvent (QPaintEvent * event) } void GLWidget::rotateBy(double xAngle, double yAngle, double zAngle, double x, double y, double z) -{ - if (visible_timer.elapsed_ms() > 250) - { - visible = is_window_visible(this); - visible_timer.start(); - } - - if (visible) - rotateBy_real(xAngle, yAngle, zAngle, x, y, z); -} - -void GLWidget::rotateBy_real(double xAngle, double yAngle, double zAngle, double x, double y, double z) { using std::sin; using std::cos; -- cgit v1.2.3