From 35a80d6757d5988749b4d5a07f4bf96ff02021ac Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 27 Apr 2013 13:32:58 +0200 Subject: Don't repaint forcefully, there's no need --- ftnoir_posewidget/glwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ftnoir_posewidget') diff --git a/ftnoir_posewidget/glwidget.cpp b/ftnoir_posewidget/glwidget.cpp index 375cb97f..8f429df7 100644 --- a/ftnoir_posewidget/glwidget.cpp +++ b/ftnoir_posewidget/glwidget.cpp @@ -26,7 +26,7 @@ void GLWidget::paintEvent ( QPaintEvent * event ) { QWidget::paintEvent(event); QPainter p(this); project_quad_texture(); - p.drawPixmap(QRect(0, 0, width(), height()), pixmap); + p.drawPixmap(event->rect(), pixmap); } void GLWidget::rotateBy(double xAngle, double yAngle, double zAngle) @@ -48,7 +48,7 @@ void GLWidget::rotateBy(double xAngle, double yAngle, double zAngle) matrix[2 * 3 + 0]= -sh*ca; matrix[2 * 3 + 1]= sh*sa*cb + ch*sb; matrix[2 * 3 + 2]= -sh*sa*sb + ch*cb; - repaint(); + update(); } static __inline double dot(const Vec2f& p1, const Vec2f& p2) { -- cgit v1.2.3