camerauis/cameraxui/cxui/src/cxuistillprecaptureview.cpp
changeset 24 2094593137f5
parent 21 fa6d9f75d6a6
child 29 699651f2666f
--- a/camerauis/cameraxui/cxui/src/cxuistillprecaptureview.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuistillprecaptureview.cpp	Fri May 14 15:40:46 2010 +0300
@@ -356,7 +356,10 @@
         capture();
     } else {
         // start focusing
-        handleAutofocusKeyPressed();
+        // Auto-focus can only work if viewfinder is running
+        if (mEngine->viewfinderControl().state() == CxeViewfinderControl::Running) {
+            mEngine->autoFocusControl().start(false);
+        }
         setCapturePending();
     }
 
@@ -370,7 +373,7 @@
 
     if (mEngine->mode() == Cxe::ImageMode) {
         // do not start capturing, if it is already ongoing
-        // the user might be repeatly triggering capture key
+        // the user might be repeatedly triggering capture key
         if (mEngine->stillCaptureControl().state() == CxeStillCaptureControl::Ready) {
             // If focusing in progress, cancel it now.
             // Set capture pending and continue once focusing is cancelled.
@@ -394,7 +397,6 @@
 
     // after capturing check what is the new amount for images left
     updateImagesLeftLabel();
-
     CX_DEBUG_EXIT_FUNCTION();
 }