Fixed issue 47315
[apps/osp/Gallery.git] / src / GlFileListEditorForm.cpp
index 0bdac54..fe02b20 100644 (file)
@@ -120,15 +120,6 @@ FileListEditorForm::OnInitializing(void)
        SetOrientation(ORIENTATION_AUTOMATIC);
        AddOrientationEventListener(*this);
 
-       __pPopUp = new (std::nothrow) SlideShowPopUp();
-
-       if (__pPopUp != null)
-       {
-               __pPopUp->Initialize();
-               __pPopUp->SetEventListner(this);
-               AddControl(__pPopUp);
-       }
-
        __pPresentationModel = FileListPresentationModel::GetInstance();
        __pPresentationModel->ClearThumbnailRequests();
 
@@ -491,8 +482,17 @@ FileListEditorForm::OnActionPerformed(const Control& source, int actionId)
 
        case IDA_CONTEXT_MENU_MORE_SLIDE_SHOW:
        {
+               if (__pPopUp != NULL)
+               {
+                       delete __pPopUp;
+                       __pPopUp = NULL;
+               }
+               __pPopUp = new (std::nothrow) SlideShowPopUp();
+
                if (__pPopUp != null)
                {
+                       __pPopUp->Initialize();
+                       __pPopUp->SetEventListner(this);
                        __pPopUp->SetShowState(true);
                        __pPopUp->Show();
                }