We already reset focus reticle when we move between cameras or change modes
[harmattan/cameraplus] / qml / CameraView.qml
index 82481d1..c4463df 100644 (file)
@@ -24,11 +24,10 @@ import QtQuick 2.0
 import QtCamera 1.0
 import CameraPlus 1.0
 
-// TODO: reset reticle and roi when we stop camera or change mode
-
 Viewfinder {
     id: viewfinder
-    property bool pressed: focusReticle.locked || (loader.item ? loader.item.pressed : false)
+    property bool pressed: focusReticle.locked || preview.animationRunning
+        || (loader.item ? loader.item.pressed : false)
     property int policyMode: loader.item ? loader.item.policyMode : CameraResources.None
 
     camera: cam
@@ -58,11 +57,12 @@ Viewfinder {
             autoFocusAcquired: platformSettings.autoFocusAcquiredSound
         }
 
+        onFocusChanged: focus.value = Focus.ContinuousNormal
         onRoiChanged: roi.normalize = false
 
         onRunningChanged: {
             if (!cam.running) {
-                mountProtector.unlock()
+                mountProtector.unlockAll()
             }
         }
 
@@ -111,6 +111,10 @@ Viewfinder {
         }
     }
 
+    PreviewImage {
+        id: preview
+    }
+
     FocusReticle {
         id: focusReticle
         cam: cam
@@ -123,10 +127,6 @@ Viewfinder {
         status: cam ? cam.autoFocus.status : -1
     }
 
-    PreviewImage {
-        id: preview
-    }
-
     Loader {
         id: loader
         property string src: cam.mode == Camera.VideoMode ? "VideoOverlay.qml" : "ImageOverlay.qml"