fixed bug
authorChulheon <ch.jeong47@samsung.com>
Fri, 22 Mar 2013 08:14:32 +0000 (17:14 +0900)
committerChulheon <ch.jeong47@samsung.com>
Fri, 22 Mar 2013 08:14:32 +0000 (17:14 +0900)
Change-Id: I453dceaeb4f33a1a603120674000a4c985be2f3b

src/ui/controls/FUiCtrl_Edit.cpp
src/ui/controls/FUiCtrl_EditPresenter.cpp
src/ui/controls/FUiCtrl_Keypad.cpp
src/ui/inc/FUiCtrl_EditPresenter.h

index fa840f0..2f893b7 100644 (file)
@@ -1855,7 +1855,10 @@ _Edit::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
 bool
 _Edit::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
 {
-       PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP);
+       if (__editStyle ^ EDIT_STYLE_VIEWER)
+       {
+               PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP);
+       }
        return _pEditPresenter->OnTouchReleased(source, touchinfo);
 }
 
@@ -2060,7 +2063,10 @@ result
 _Edit::OnDetachingFromMainTree(void)
 {
        __isDestroyed = true;
-
+       if (_pEditPresenter->IsBounded())
+       {
+               DetachScrollPanelEvent();
+       }
        return E_SUCCESS;
 }
 
index 0114ae4..06dca4d 100644 (file)
@@ -971,11 +971,6 @@ _EditPresenter::Dispose(void)
        {
                delete __pInputConnection;
                __pInputConnection = null;
-
-               if (__pEdit)
-               {
-                       __pEdit->DetachScrollPanelEvent();
-               }
        }
 
        delete __pTextObject;
@@ -5961,6 +5956,12 @@ _EditPresenter::ShowFullscreenKeypad(void)
 {
        result r = E_SUCCESS;
 
+       if (IsKeypadEnabled() == false)
+       {
+               r = ShowKeypad();       //Just bind to input connection and skip to open fullscreen keypad
+               return r;
+       }
+
        if (__pFullscreenKeypad)
        {
                delete __pFullscreenKeypad;
@@ -8119,6 +8120,7 @@ _EditPresenter::OnPasswordTimerExpired(void)
        }
 
        ReplaceTextIntoPasswordHyphenString();
+       __isCursorChanged = true;
 
        __pEdit->Invalidate();
 
@@ -9797,6 +9799,12 @@ _EditPresenter::SendOpaqueCommand (const String& command)
 }
 
 bool
+_EditPresenter::IsBounded(void) const
+{
+       return __isInputConnectionBound;
+}
+
+bool
 _EditPresenter::AdjustRTLTextAlignment(const _EditTextType textType)
 {
        result r = E_SUCCESS;
@@ -9871,11 +9879,11 @@ _EditPresenter::AdjustRTLTextAlignment(const _EditTextType textType)
                {
                        if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
                        {
-                               r = __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE);
+                               r = __pGuideTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE);
                        }
                        else
                        {
-                               r = __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP);
+                               r = __pGuideTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP);
                        }
                        if (r == E_SUCCESS)
                        {
index bc74ad3..fff583e 100644 (file)
@@ -525,13 +525,24 @@ _Keypad::SendOpaqueCommand (const Tizen::Base::String& command)
 void
 _Keypad::OnActionPerformed(const _Control& source, int actionId)
 {
+       bool isReCreationLock = false;
        if ((actionId != COMMAND_DONE_BUTTON_ID) && (actionId != COMMAND_CANCEL_BUTTON_ID))
        {
                return;
        }
 
        __pChildEdit->HideKeypad();
+
+       if (__pCallerEdit)
+       {
+               __pCallerEdit->SetKeypadEnabled(false);
+               isReCreationLock = true;
+       }
        Close();
+       if (isReCreationLock)
+       {
+               __pCallerEdit->SetKeypadEnabled(true);
+       }
 
        CoreTextEventStatus textEventStatus = CORE_TEXT_EVENT_CHANGED;
        if (actionId == COMMAND_DONE_BUTTON_ID)
index c2d77d9..b42a0a4 100644 (file)
@@ -321,6 +321,7 @@ public:
        virtual bool ValidatePastedText(const Tizen::Base::String& pastedText, Tizen::Base::String& replacedText);
        void SendOpaqueCommand (const Tizen::Base::String& command);
        Tizen::Ui::Animations::_VisualElement* GetTextVisualElement(void);
+       bool IsBounded(void) const;
 
 protected:
        void StopTitleSlidingTimer(void);