Stop autofocus when image capture has ended.
authorMohammed Sameer <msameer@foolab.org>
Sun, 4 Aug 2013 00:38:44 +0000 (03:38 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sun, 4 Aug 2013 00:38:44 +0000 (03:38 +0300)
Some pipelines might not support preview generation. If we have such a pipeline
then we will never stop auto focus since we do that when we get the preview.

qml/ImageOverlay.qml

index c90f69e..c9416f3 100644 (file)
@@ -41,10 +41,10 @@ Item {
     ImageMode {
         id: imageMode
         camera: cam
-        onPreviewAvailable: {
-            overlay.previewAvailable(preview)
-            cam.autoFocus.stopAutoFocus()
-        }
+
+        onCaptureEnded: cam.autoFocus.stopAutoFocus()
+
+        onPreviewAvailable: overlay.previewAvailable(preview)
 
         onSaved: mountProtector.unlock()
     }