From 299354439b748e739e3d8c49dc8032ff2d4d0caa Mon Sep 17 00:00:00 2001 From: chitta ranjan Date: Sat, 27 Apr 2013 17:46:41 +0900 Subject: [PATCH] Nabi issue fix Change-Id: I3f99b54395fd04d15f9132a9b766dc7845525c09 Signed-off-by: chitta ranjan --- src/IvImageViewerForm.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/IvImageViewerForm.cpp b/src/IvImageViewerForm.cpp index dfb5249..6a59ca4 100644 --- a/src/IvImageViewerForm.cpp +++ b/src/IvImageViewerForm.cpp @@ -1595,6 +1595,25 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId) case IDA_CONTEXTMENU_CALLER: { + String filePath; + filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex()); + ImageBuffer imagebuffer; + result r = imagebuffer.Construct(filePath); + if (r != E_SUCCESS) + { + return; + } + int imageWidth = imagebuffer.GetWidth(); + int imageHeight = imagebuffer.GetHeight(); + if (imageWidth <= (H_CROP_RECTANGLE * 5) || imageHeight <= (H_CROP_RECTANGLE * 5)) + { + MessageBox messageBox; + String messageText = ResourceManager::GetString(L"IDS_IMGE_POP_IMAGE_IS_TOO_SMALL"); + messageBox.Construct(L"", messageText, MSGBOX_STYLE_OK, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + return; + } HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); pDataList->Construct(); pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SELECTION_MODE), -- 2.7.4