Nabi issue fix
authorchitta ranjan <chitta.rs@samsung.com>
Sat, 27 Apr 2013 08:46:41 +0000 (17:46 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Sat, 27 Apr 2013 08:46:41 +0000 (17:46 +0900)
Change-Id: I3f99b54395fd04d15f9132a9b766dc7845525c09
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
src/IvImageViewerForm.cpp

index dfb5249..6a59ca4 100644 (file)
@@ -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),