qstmgesturelib/qstmutils.cpp
changeset 16 3c88a81ff781
parent 3 0954f5dd2cd0
--- a/qstmgesturelib/qstmutils.cpp	Thu Sep 23 15:32:11 2010 -0400
+++ b/qstmgesturelib/qstmutils.cpp	Fri Oct 15 17:30:59 2010 -0400
@@ -32,7 +32,7 @@
 
 QRect QStm_Utils::toleranceRectMm( const QPoint& centerPoint, int size_mm )
 {
-	long toleranceLength = mm2Pixels(size_mm) / 2;
+	long toleranceLength = mm2Pixels(size_mm);
 	return toleranceRectPx(centerPoint, toleranceLength);
 }
 
@@ -48,7 +48,8 @@
 long QStm_Utils::mm2Pixels(long mm)
 {
 	//return Twips2Pixels(mm * KTwipsInMm);
-	return mm * QApplication::desktop()->height() / QApplication::desktop()->heightMM();
+    qreal r = QApplication::desktop()->height() / QApplication::desktop()->heightMM();
+	return mm * r;
 }
 
 long QStm_Utils::inches2Pixels(double inches)