From 3d478670db05e7fe64ccb73bf5819ca1e95c20d8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 24 Jun 2016 10:49:51 +0100 Subject: [PATCH] Fixed float handling --- src/osgQt/GraphicsWindowQt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgQt/GraphicsWindowQt.cpp b/src/osgQt/GraphicsWindowQt.cpp index 9b551f602..3695ee50d 100644 --- a/src/osgQt/GraphicsWindowQt.cpp +++ b/src/osgQt/GraphicsWindowQt.cpp @@ -444,7 +444,7 @@ bool GLWidget::gestureEvent( QGestureEvent* qevent ) //We don't have absolute positions of the two touches, only a scale and rotation //Hence we create pseudo-coordinates which are reasonable, and centered around the //real position - const float radius = (width()+height())/4; + const float radius = float(width()+height())/4.0f; const osg::Vec2 vector( scale*cos(angle)*radius, scale*sin(angle)*radius); const osg::Vec2 p0 = pinchCenter+vector; const osg::Vec2 p1 = pinchCenter-vector;