From a66701af931373d0edee806299d4d3d5b0294e16 Mon Sep 17 00:00:00 2001 From: Himanshu Date: Fri, 26 Jul 2013 15:11:10 +0530 Subject: [PATCH] Fixed issue 47315 Change-Id: Ia09c1c1f6ad2781e211f1bf76e90ee5d8a532ca1 Signed-off-by: Himanshu --- src/GlFileListEditorForm.cpp | 18 +++++++++--------- src/GlFileListForm.cpp | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/GlFileListEditorForm.cpp b/src/GlFileListEditorForm.cpp index 0bdac54..fe02b20 100644 --- a/src/GlFileListEditorForm.cpp +++ b/src/GlFileListEditorForm.cpp @@ -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(); } diff --git a/src/GlFileListForm.cpp b/src/GlFileListForm.cpp index e4a47d9..dc276e0 100644 --- a/src/GlFileListForm.cpp +++ b/src/GlFileListForm.cpp @@ -83,15 +83,6 @@ FileListForm::OnInitializing(void) __pPresentationModel = FileListPresentationModel::GetInstance(); __pPresentationModel->ClearThumbnailRequests(); - __pPopUp = new (std::nothrow) SlideShowPopUp(); - - if (__pPopUp != null) - { - __pPopUp->Initialize(); - __pPopUp->SetEventListner(this); - AddControl(__pPopUp); - } - InitializeFooter(); SetFormBackEventListener(this); SetOrientation(ORIENTATION_AUTOMATIC); @@ -159,8 +150,17 @@ FileListForm::OnActionPerformed(const Control& source, int actionId) case IDA_FOOTER_SLIDESHOW: { + 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(); } -- 2.7.4