camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp
branchRCL_3
changeset 17 8f559c47d7fd
parent 16 53c8aa5d97a3
child 19 e32fcfe0045f
--- a/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp	Tue May 25 12:22:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp	Wed Jun 09 09:21:41 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -209,7 +209,10 @@
             break;
        case ECamCmdPopUpMenuZoom: 
             {
-            iContainer->ShowZoomPaneWithTimer();
+            if ( iContainer )
+                {
+                iContainer->ShowZoomPaneWithTimer();
+                }
             }     
             break;
         case ECamCmdCaptureSetupFlashStill:
@@ -247,6 +250,13 @@
                 }
             }     
             break;
+        case ECamCmdSettings:
+            // Hide the capture button
+            if ( iContainer )
+                {
+                iContainer->SetFocus( EFalse );
+                }
+            // fall-through
         default:
             {                                       
             CCamCaptureSetupViewBase::HandleCommandL( aCommand );                            
@@ -661,8 +671,12 @@
         {
         StatusPane()->MakeVisible( EFalse );
         }
+    
     if ( iController.IsTouchScreenSupported() )
         {
+        // Make sure that icons are upto date
+        UpdateToolbarIconsL();
+    
         CAknToolbar* fixedToolbar = Toolbar();
         if ( fixedToolbar )
             {
@@ -790,6 +804,10 @@
 void CCamPreCaptureViewBase::DoDeactivate()
     {                              
     PRINT( _L( "Camera => CCamPreCaptureViewBase::DoDeactivate" ) );
+    
+    delete iGestureFw;
+    iGestureFw = NULL;
+
     CCamCaptureSetupViewBase::DoDeactivate();
                                
     iController.RemoveControllerObserver( this );
@@ -1864,18 +1882,21 @@
         CCamZoomPane *zoomPane = appUi->ZoomPane();
         
         CCamPreCaptureContainerBase* container = static_cast<CCamPreCaptureContainerBase*>( iContainer );
-        container->ShowZoomPaneWithTimer();
-
-        // Zoom to min (if not already at min) zoom level, otherwise zoom in to max level
-        if ( !zoomPane->IsZoomAtMinimum() )
+        if ( container && zoomPane )
             {
-            PRINT( _L("Camera <> Zooming out to min level") );
-            zoomPane->ZoomToMinimum();
-            }
-        else
-            {
-            PRINT( _L("Camera <> Zooming to max level") );
-            zoomPane->ZoomToMaximum();
+            container->ShowZoomPaneWithTimer();
+
+            // Zoom to min (if not already at min) zoom level, otherwise zoom in to max level
+            if ( !zoomPane->IsZoomAtMinimum() )
+                {
+                PRINT( _L("Camera <> Zooming out to min level") );
+                zoomPane->ZoomToMinimum();
+                }
+            else
+                {
+                PRINT( _L("Camera <> Zooming to max level") );
+                zoomPane->ZoomToMaximum();
+                }
             }
         }
     else