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
{