populate post capture model when page is current and clear it when we leave
[harmattan/cameraplus] / lib / qtcamroi_p.h
index 6118da0..b794303 100644 (file)
@@ -3,7 +3,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -119,7 +119,7 @@ public:
       }
     }
 
-    return -1;
+    return index;
   }
 
 public slots:
@@ -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);