Fixed P130328-9994(PLM issue)
authorJongwooLee <jongwoo718.lee@samsung.com>
Thu, 4 Apr 2013 05:17:01 +0000 (14:17 +0900)
committerJongwooLee <jongwoo718.lee@samsung.com>
Thu, 4 Apr 2013 07:43:18 +0000 (16:43 +0900)
Change-Id: I2b44c04cec00580192332623d27173b83c21eff9
Signed-off-by: JongwooLee <jongwoo718.lee@samsung.com>
src/ui/controls/FUiCtrl_GalleryPresenter.cpp
src/ui/controls/FUiCtrl_GalleryViewEventHandler.cpp

index 1350a1c..d7dc447 100644 (file)
@@ -22,6 +22,7 @@
 #include "FUiCtrl_Gallery.h"
 #include "FUiCtrl_GalleryPresenter.h"
 #include "FUiCtrl_GalleryModel.h"
+#include "FUiCtrl_GalleryItem.h"
 #include "FUiCtrl_GalleryItemProvider.h"
 #include "FUiCtrl_GalleryCoreEvent.h"
 #include "FUiCtrl_GalleryCoreEventArg.h"
@@ -909,7 +910,14 @@ _GalleryPresenter::SetPartialCanvasImage(void)
        SysTryReturn(NID_UI_CTRL, __currentItemIndex >= 0, E_INVALID_ARG, E_INVALID_ARG,
                                "[E_INVALID_ARG] The argument(%d) is negative value.", __currentItemIndex);
 
+       _GalleryItem* pGalleryItem = __pGalleryModel->GetItem(__currentItemIndex);
+       if (pGalleryItem->GetGalleryItemFilePath() == L"")
+       {
+               return E_SUCCESS;
+       }
+
        int currentCanvasIndex = SearchCanvasIndex(__currentItemIndex);
+
        FloatRectangle canvasBounds = __galleryRenderer.GetCanvasBounds(currentCanvasIndex);
        FloatRectangle imageBounds = __galleryRenderer.GetCanvasImageBounds(currentCanvasIndex);
        FloatRectangle viewBounds = __galleryRenderer.GetViewRect();
index 1b17013..19ebd77 100644 (file)
@@ -197,9 +197,11 @@ _GalleryViewEventHandler::OnTouchReleased(_GalleryViewEventInfo& eventInfo)
                        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r));
                        //__zoomMode = false;
                }
-
-               r = AlignCanvas();
-               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+               else
+               {
+                       r = AlignCanvas();
+                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+               }
                __pinchInitialArea = 0;
                __startPinchCenterPosition.SetPosition(0.0, 0.0);
                __pinchMode = false;
@@ -220,6 +222,7 @@ CATCH:
        __pinchInitialArea = 0;
        __pinchMode = false;
        __flickingDirection = FLICK_DIRECTION_NONE;
+       __zoomMode = false;
        return true;
 }