photosgallery/imgvwr/src/glxivwrdocument.cpp
changeset 4 57d388cc48c1
parent 1 9ba538e329bd
child 9 6b87b143d312
--- a/photosgallery/imgvwr/src/glxivwrdocument.cpp	Tue Jan 26 11:58:28 2010 +0200
+++ b/photosgallery/imgvwr/src/glxivwrdocument.cpp	Tue Feb 02 00:10:37 2010 +0200
@@ -93,7 +93,12 @@
     TRACER("CFileStore* CGlxIVwrDocument::OpenFileL");
     // Reset old data
     ResetDocument();
+    
     iImageViewerInstance->SetImageUriL(aFilename);
+    
+    // Open the viewer
+    static_cast<CGlxIVwrAppUi*>(iAppUi)->HandleOpenFileL();
+    
     return NULL;
     }
 
@@ -104,13 +109,16 @@
 void CGlxIVwrDocument::OpenFileL( CFileStore*& /*aFileStore*/, RFile& aFile )
     {	
     TRACER("CGlxIVwrDocument::OpenFileL()");
+    // Reset old data
+    ResetDocument();    
+    
     // Make sure that aFile is closed in leave situation
     CleanupClosePushL( aFile );
-
-    // Reset old data
-    ResetDocument();    
     iImageViewerInstance->SetImageFileHandleL(aFile);	
     CleanupStack::PopAndDestroy(); // Close aFile
+    
+    // Open the viewer
+    static_cast<CGlxIVwrAppUi*>(iAppUi)->HandleOpenFileL();
     }
 
 // ----------------------------------------------------------------------------