fixed bug (N_SE-45935,N_SE-45952,N_SE-45639)
authorChulheon <ch.jeong47@samsung.com>
Fri, 12 Jul 2013 04:58:56 +0000 (13:58 +0900)
committerChulheon <ch.jeong47@samsung.com>
Fri, 12 Jul 2013 04:58:56 +0000 (13:58 +0900)
Change-Id: Ifdd960d999a4dbc20f27cf2c1eb37c6ffa2c14ad

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

index f5a8abd..57f052d 100755 (executable)
@@ -2085,9 +2085,9 @@ _Edit::OnBoundsChanged(void)
 }
 
 void
-_Edit::OnChangeLayout(_ControlOrientation orientation)
+_Edit::OnChangeLayout(_ControlRotation rotation)
 {
-       result r = _pEditPresenter->ChangeLayout(orientation);
+       result r = _pEditPresenter->ChangeLayout(rotation);
        SetLastResult(r);
 
        return;
@@ -2158,7 +2158,10 @@ _Edit::OnAncestorEnableStateChanged(const _Control& control)
        if (this == dynamic_cast< const _Edit* >(&control))
        {
                _pEditPresenter->SetKeypadEventSkipped(!enableState);
-               _pEditPresenter->SetCursorDisabled(!enableState);
+               if (__inputStyle != INPUT_STYLE_FULLSCREEN)
+               {
+                       _pEditPresenter->SetCursorDisabled(!enableState);
+               }
        }
 
        Invalidate();
index c876fcb..e72b0a1 100755 (executable)
@@ -451,6 +451,8 @@ _EditPresenter::OnInputConnectionPanelLanguageChanged(InputConnection& source, L
 void
 _EditPresenter::OnInputConnectionPanelBoundsChanged(InputConnection& source, const Rectangle& bounds)
 {
+       float previousHeight = __keypadBounds.height;
+
        CheckUSBKeyboardStatus();
 
        if ((__isUSBKeyboardConnected == false) && __isKeypadExist == false)
@@ -491,7 +493,10 @@ _EditPresenter::OnInputConnectionPanelBoundsChanged(InputConnection& source, con
                DrawText();
                if (__pCopyPasteManager->GetCopyPastePopup())
                {
-                       __pCopyPasteManager->CreateCopyPastePopup();
+                       if (previousHeight != bounds.height)
+                       {
+                               __pCopyPasteManager->CreateCopyPastePopup();
+                       }
                }
                __pCopyPasteManager->Show();
        }
@@ -7471,6 +7476,23 @@ _EditPresenter::ChangeLayout(_ControlOrientation orientation)
 }
 
 result
+_EditPresenter::ChangeLayout(_ControlRotation rotation)
+{
+       _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
+
+       if (rotation == _CONTROL_ROTATION_0 || rotation == _CONTROL_ROTATION_180)
+       {
+               orientation = _CONTROL_ORIENTATION_PORTRAIT;
+       }
+       else
+       {
+               orientation = _CONTROL_ORIENTATION_LANDSCAPE;
+       }
+
+       return ChangeLayout(orientation);
+}
+
+result
 _EditPresenter::ChangeLayoutInternal(_ControlOrientation orientation, bool deflateForm)
 {
        result r = E_SUCCESS;
index 98d0788..a49499a 100755 (executable)
@@ -425,8 +425,11 @@ _Keypad::ChangeLayoutInternal(LayoutChangeState layoutChangeState)
        bool isKeypadExist = false;
        bool isClipboardExist = false;
 
-       isKeypadExist = __pChildEdit->CheckKeypadExist(orientation);
-       isClipboardExist = __pChildEdit->IsClipboardExist();
+       if (__isInitialized)
+       {
+               isKeypadExist = __pChildEdit->CheckKeypadExist(orientation);
+               isClipboardExist = __pChildEdit->IsClipboardExist();
+       }
 
        if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
        {
@@ -556,6 +559,12 @@ _Keypad::OnDetachingFromMainTree(void)
 void
 _Keypad::OnNativeWindowActivated(void)
 {
+       if (__isFirstCall && __pChildEdit)
+       {
+               __pChildEdit->SetFocused();
+               __isFirstCall = false;
+       }
+
        return;
 }
 
@@ -572,12 +581,6 @@ _Keypad::OnDraw(void)
        GET_COLOR_CONFIG(EDIT::BG_NORMAL, backgroundColor);
        SetBackgroundColor(backgroundColor);
 
-       if (__isFirstCall)
-       {
-               __pChildEdit->SetFocused();
-               __isFirstCall = false;
-       }
-
        return;
 }
 
index 19a8b0c..f79c064 100755 (executable)
@@ -471,7 +471,7 @@ public:
        void OnScrollPanelBoundsChanged(void);
        virtual result OnAttachedToMainTree(void);
        virtual void OnBoundsChanged(void);
-       virtual void OnChangeLayout(_ControlOrientation orientation);
+       virtual void OnChangeLayout(_ControlRotation rotation);
        virtual void OnClipboardPopupClosed(const ClipboardItem* pClipboardItem);
        virtual void OnDraw(void);
        virtual bool OnFocusGained(const _Control& source);
index 5918155..9bfc666 100755 (executable)
@@ -270,6 +270,7 @@ public:
        result CalculateAbsoluteCursorBounds(int index, Tizen::Graphics::FloatRectangle& absCursorBounds);
        result CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, FloatRectangle& absCursorBounds);
        virtual result ChangeLayout(_ControlOrientation orientation);
+       virtual result ChangeLayout(_ControlRotation rotation);
        result ClearText(void);
        result CopyText(void);
        virtual result CutText(void);