photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp
branchRCL_3
changeset 14 ce1c7ad1f18b
parent 0 4e91876724a2
child 35 420f6808bf21
--- a/photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -195,10 +195,7 @@
 				{
 				if ( !iWithinFocusChangeCall )
 					{
-					// iWithinFocusChangeCall = ETrue;
 					HandleFocusChanged( FocusIndex(), iPreviousFocusIndex );
-					//iPreviousFocusIndex = FocusIndex();
-					//iWithinFocusChangeCall = EFalse;
 					}
 				response = EEventHandled;
 				}
@@ -452,7 +449,14 @@
         // Check if Model count is zero in FS view, activate back grid view.
         if (iModel->Count() ==0)
             {
-            TRAP_IGNORE( iNavigationalState->ActivatePreviousViewL() );    
+            // if Count is Zero, set the navigation state to 
+            // EGlxNavigationBackwards before going back to grid view
+            CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+            CleanupClosePushL( *uiUtility );
+            uiUtility->SetViewNavigationDirection(EGlxNavigationBackwards);
+            CleanupStack::PopAndDestroy( uiUtility );
+            
+            TRAP_IGNORE( iNavigationalState->ActivatePreviousViewL() );            
             }
         }
     else