From: Chulheon Date: Fri, 12 Jul 2013 04:58:56 +0000 (+0900) Subject: fixed bug (N_SE-45935,N_SE-45952,N_SE-45639) X-Git-Tag: accepted/tizen/20130924.144426~1^2~40^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f85f8262f9863e590a076c3783608ba7f73af74;p=platform%2Fframework%2Fnative%2Fuifw.git fixed bug (N_SE-45935,N_SE-45952,N_SE-45639) Change-Id: Ifdd960d999a4dbc20f27cf2c1eb37c6ffa2c14ad --- diff --git a/src/ui/controls/FUiCtrl_Edit.cpp b/src/ui/controls/FUiCtrl_Edit.cpp index f5a8abd..57f052d 100755 --- a/src/ui/controls/FUiCtrl_Edit.cpp +++ b/src/ui/controls/FUiCtrl_Edit.cpp @@ -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(); diff --git a/src/ui/controls/FUiCtrl_EditPresenter.cpp b/src/ui/controls/FUiCtrl_EditPresenter.cpp index c876fcb..e72b0a1 100755 --- a/src/ui/controls/FUiCtrl_EditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditPresenter.cpp @@ -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; diff --git a/src/ui/controls/FUiCtrl_Keypad.cpp b/src/ui/controls/FUiCtrl_Keypad.cpp index 98d0788..a49499a 100755 --- a/src/ui/controls/FUiCtrl_Keypad.cpp +++ b/src/ui/controls/FUiCtrl_Keypad.cpp @@ -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; } diff --git a/src/ui/inc/FUiCtrl_Edit.h b/src/ui/inc/FUiCtrl_Edit.h index 19a8b0c..f79c064 100755 --- a/src/ui/inc/FUiCtrl_Edit.h +++ b/src/ui/inc/FUiCtrl_Edit.h @@ -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); diff --git a/src/ui/inc/FUiCtrl_EditPresenter.h b/src/ui/inc/FUiCtrl_EditPresenter.h index 5918155..9bfc666 100755 --- a/src/ui/inc/FUiCtrl_EditPresenter.h +++ b/src/ui/inc/FUiCtrl_EditPresenter.h @@ -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);