Fixed N_SE-39997
authorSeema <seema.nagraj@samsung.com>
Thu, 30 May 2013 10:55:14 +0000 (16:25 +0530)
committerSeema <seema.nagraj@samsung.com>
Thu, 30 May 2013 10:55:14 +0000 (16:25 +0530)
Change-Id: Icd3b9cc785ba6b7a9892672615e94eff8aa159ed
Signed-off-by: Seema <seema.nagraj@samsung.com>
src/MmDrawingEditorForm.cpp

index 10b209f..7d43962 100644 (file)
@@ -916,27 +916,45 @@ MemoDrawingEditorForm::SetSaveEnabled(bool isEnable)
 
        if (isEnable == true)
        {
-               if(__pCurveLine != null)
+               if(__isEditMode == false)
                {
-                       int pointCount = __pCurveLine->GetObjectCount();
-                       if (__isEditMode == false)
+                       int pointCount = 0;
+                       if(__pCurveLine != null)
                        {
-                               if (pointCount > 1 || comment.GetLength() != 0)
-                               {
-                                       __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
-                               }
+                               pointCount = __pCurveLine->GetObjectCount();
+                       }
+                       if (pointCount > 1 || comment.GetLength() != 0)
+                       {
+                               __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
                        }
                        else
                        {
-                               if(pointCount > 1 || IsCommentEdited() == true)
-                               {
-                                       __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
-                               }
+                               __pComment->Clear();
+                               __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
+                               __pFormHeader->SetButtonTextColor(BUTTON_ITEM_STATUS_DISABLED, Color::GetColor(COLOR_ID_GREY));
                        }
                }
-               else if(comment.GetLength() != 0)
+               else if(__isEditMode == true)
                {
-                       __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
+                       int pointCount = 0;
+                       if(__pCurveLine != null)
+                       {
+                               pointCount = __pCurveLine->GetObjectCount();
+                       }
+                       else if(__pEraser != null)
+                       {
+                               pointCount = __pEraser->eraserPointLists.GetCount();
+                       }
+                       if (pointCount > 1 || IsCommentEdited() == true)
+                       {
+                               __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
+                       }
+                       else
+                       {
+                               __pComment->Clear();
+                               __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
+                               __pFormHeader->SetButtonTextColor(BUTTON_ITEM_STATUS_DISABLED, Color::GetColor(COLOR_ID_GREY));
+                       }
                }
                else
                {