Fixed issue 47790
[apps/osp/Gallery.git] / src / GlAlbumNameEditorForm.cpp
index 3ce1d2f..a6bb664 100644 (file)
@@ -207,9 +207,20 @@ AlbumNameEditorForm::OnTextValueChanged(const Control& source)
                        CreateMessage(msg);
                        currentInput.Replace("/", "");
                        __pNameEditField->SetText(currentInput);
+
+                       if (currentInput == L"")
+                       {
+                               if (GetFooter() != null)
+                               {
+                                       GetFooter()->SetItemEnabled(0, false);
+                                       GetFooter()->Invalidate(true);
+                               }
+                       }
                }
 
-               inputLength = byteCount;
+               byteCountForInput = __pNameEditField->GetText();
+               r = utf8.GetByteCount(byteCountForInput, inputLength);
+
                if (inputLength  >= tempLength)
                {
                        String maxCharacterString;