Add exception handling in the image viewer zoom mode
authorGeunsun, Lee <gs86.lee@samsung.com>
Wed, 3 May 2017 06:00:40 +0000 (15:00 +0900)
committerGeunsun, Lee <gs86.lee@samsung.com>
Wed, 3 May 2017 06:00:40 +0000 (15:00 +0900)
Change-Id: I1e11af776f8d7e9a84a8526a76978badcfa35919

TVMediaHub/TVMediaHub.Tizen/Views/ImageViewerZoom.xaml.cs

index 7e3b95a..a415c75 100755 (executable)
@@ -364,7 +364,7 @@ namespace TVMediaHub.Tizen.Views
             backgroundThumbnail.Show();
 
             thumbnailImg = new ElmSharp.Image(App.MainWindow);
-            thumbnailImg.Load(ThumbnailPath);
+            thumbnailImg.Load((ThumbnailPath != null) ? ThumbnailPath : (CurrentImage.Source as FileImageSource).File);
             thumbnailImg.Orientation = imgOrientation;
             thumbnailImg.Resize(backgroundThumbnail.Geometry.Width, backgroundThumbnail.Geometry.Height);
             thumbnailImg.Move(backgroundThumbnail.Geometry.X, backgroundThumbnail.Geometry.Y);
@@ -381,7 +381,7 @@ namespace TVMediaHub.Tizen.Views
             thumbnailDim.Show();
 
             clippingImg = new ElmSharp.Image(App.MainWindow);
-            clippingImg.Load(ThumbnailPath);
+            clippingImg.Load((ThumbnailPath != null) ? ThumbnailPath : (CurrentImage.Source as FileImageSource).File);
             clippingImg.Orientation = imgOrientation;
             clippingImg.Resize(thumbnailImg.Geometry.Width, thumbnailImg.Geometry.Height);
             clippingImg.Geometry = thumbnailImg.Geometry;