Fix for 48036
[apps/osp/Gallery.git] / src / GlAllListPanel.cpp
index e7590a6..beeefd6 100644 (file)
@@ -90,6 +90,17 @@ AllListPanel::Refresh(void)
 
                pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST));
        }
+       else
+       {
+               SceneManager* pSceneManager = SceneManager::GetInstance();
+               TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager", GetErrorMessage(GetLastResult()));
+
+               FileListForm* pFileListForm = dynamic_cast<FileListForm*>(pSceneManager->GetCurrentScene()->GetForm());
+               if (pFileListForm != null)
+               {
+                       pFileListForm->SetMenuState(true);
+               }
+       }
 
        __pContentIconListView->UpdateList();
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -312,10 +323,24 @@ AllListPanel::OnThumbnailDecoded(const int index)
 }
 
 void
+AllListPanel::ChangeOrientation(void)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       const Form* pForm = dynamic_cast<Form*>(pSceneManager->GetCurrentScene()->GetForm());
+       TryReturn(pForm != null,, "[%s] fail to get the form.", GetErrorMessage(GetLastResult()));
+
+       Rectangle clientAreaBounds = pForm->GetClientAreaBounds();
+       SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height);
+       __pContentIconListView->SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height);
+}
+
+void
 AllListPanel::OnSceneActivatedN(const SceneId& previousSceneId,
                                                                const SceneId& currentSceneId, IList* pArgs)
 {
        AppLogDebug("ENTER");
+       ChangeOrientation();
 
        __pPresentationModel = FileListPresentationModel::GetInstance();
 
@@ -358,7 +383,7 @@ AllListPanel::OnSceneActivatedN(const SceneId& previousSceneId,
                {
                        pFileListForm->SetTitleText(__pPresentationModel->GetCurrentAlbumName());
 
-                       if__itemCount == 0)
+                       if (__itemCount == 0)
                        {
                                pFileListForm->SetMenuState(false);
                        }