Set area used to calculate primary index to 1x1
authorMohammed Sameer <msameer@foolab.org>
Sun, 3 Feb 2013 19:38:42 +0000 (21:38 +0200)
committerMohammed Sameer <msameer@foolab.org>
Sun, 3 Feb 2013 19:39:33 +0000 (21:39 +0200)
We are dealing with normalized coordinates where maximum width and height would be 1

lib/qtcamroi_p.h

index b2fa30a..88a492a 100644 (file)
@@ -178,7 +178,7 @@ private slots:
       rects << rect;
     }
 
-    int index = primaryRegion(QRectF(0, 0, width, height), rects);
+    int index = primaryRegion(QRectF(0, 0, 1, 1), rects);
 
     QList<QRectF> rest(rects);
     QRectF primary = index == -1 ? QRectF() : rest.takeAt(index);