From 044a7585e42627bf8ff9fd7c52f4831f6fa49f2d Mon Sep 17 00:00:00 2001 From: Taejun Date: Wed, 10 Apr 2013 18:00:59 +0900 Subject: [PATCH] Fix formDeflate logic when rotate[N_SE-32944] Change-Id: I94724beb9d55dc9483c2d5d5285510a23cbaeea5 --- src/ui/controls/FUiCtrl_EditPresenter.cpp | 30 +++++++++--------------------- src/ui/inc/FUiCtrl_EditPresenter.h | 1 - 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/ui/controls/FUiCtrl_EditPresenter.cpp b/src/ui/controls/FUiCtrl_EditPresenter.cpp index 481f87a..b02391d 100755 --- a/src/ui/controls/FUiCtrl_EditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditPresenter.cpp @@ -101,7 +101,6 @@ bool _EditPresenter::__isKeypadExist = false; bool _EditPresenter::__isClipboardExist = false; float _EditPresenter::__initialParentHeight = 0.0f; float _EditPresenter::__clipboardHeight = 0.0f; -bool _EditPresenter::__isPanelBoundsChanging = false; _EditFooterVisibleStatus _EditPresenter::__initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE; _EditAnimationProvider::_EditAnimationProvider(void) @@ -854,7 +853,7 @@ _EditPresenter::OnClipboardPopupBoundsChanged(Tizen::Graphics::Dimension& clipbo if (__isKeypadExist) { - if (floatClipboardPopupSize.height > absKeypadBounds.height) + if (floatClipboardPopupSize.height >= absKeypadBounds.height) { ChangeLayoutInternal(__pEdit->GetOrientation()); AdjustParentPanelHeight(false, true); @@ -4313,10 +4312,10 @@ String _EditPresenter::GetText(int start, int end) const { String tempString; - SysTryReturn(NID_UI_CTRL, (start <= end), tempString, E_SYSTEM, "[E_SYSTEM] The invalid argument(start = %d, end = %d) is given."); + SysTryReturn(NID_UI_CTRL, (start <= end), tempString, E_SYSTEM, "[E_SYSTEM] The invalid argument(start = %d, end = %d) is given.", start, end); int textLength = GetTextLength(); - SysTryReturn(NID_UI_CTRL, (start < textLength && end < textLength), tempString, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The invalid argument(start = %d, end = %d) is given."); + SysTryReturn(NID_UI_CTRL, (start < textLength && end < textLength), tempString, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The invalid argument(start = %d, end = %d) is given.", start, end); if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) { @@ -6375,6 +6374,8 @@ _EditPresenter::ChangeLayout(_ControlOrientation orientation) if (__isInputConnectionBound || __clipboardConnected) { + SysLog(NID_UI_CTRL, "[EDIT]-------------------ChangeLayout------------------------"); + if (__pParentForm) { __pParentForm->DeflateClientRectHeight(0.0f); @@ -6385,17 +6386,18 @@ _EditPresenter::ChangeLayout(_ControlOrientation orientation) __pCommandButton->SetVisibleState(false); } - if (__isKeypadExist || __clipboardConnected) + if (__isKeypadExist && ! __clipboardConnected) //only keypad exists, already get keypadbounds before callback { __initialParentHeight = 0.0f; ChangeLayoutInternal(orientation); AdjustParentPanelHeight(false); } - else + else // if clipboard exists, boundsChanged callback will delivered after rotate callback { + __initialParentHeight = 0.0f; + if (__isKeypadCommandButtonVisible) { - __initialParentHeight = 0.0f; ChangeLayoutInternal(orientation); AdjustParentPanelHeight(false); } @@ -6597,9 +6599,7 @@ _EditPresenter::AdjustParentPanelHeight(bool restore, bool panelResizeByPredicti scrollPanelBounds.height = __initialParentHeight; __initialParentHeight = 0.0f; - __isPanelBoundsChanging = true; __pParentPanel->SetBounds(scrollPanelBounds); - __isPanelBoundsChanging = false; __pParentPanel->Invalidate(); } } @@ -6653,11 +6653,7 @@ _EditPresenter::AdjustParentPanelHeight(bool restore, bool panelResizeByPredicti if (gapY > 0.0f) { scrollPanelBounds.height = gapY; - - __isPanelBoundsChanging = true; __pParentPanel->SetBounds(scrollPanelBounds); - __isPanelBoundsChanging = false; - __pParentPanel->Invalidate(); } } @@ -6666,11 +6662,7 @@ _EditPresenter::AdjustParentPanelHeight(bool restore, bool panelResizeByPredicti if ((gapY > 0.0f) && __initialParentHeight) { scrollPanelBounds.height = gapY; - - __isPanelBoundsChanging = true; __pParentPanel->SetBounds(scrollPanelBounds); - __isPanelBoundsChanging = false; - __pParentPanel->Invalidate(); } } @@ -6687,11 +6679,7 @@ _EditPresenter::AdjustParentPanelHeight(bool restore, bool panelResizeByPredicti __initialParentHeight = scrollPanelBounds.height; scrollPanelBounds.height = gapY; - - __isPanelBoundsChanging = true; __pParentPanel->SetBounds(scrollPanelBounds); - __isPanelBoundsChanging = false; - __pParentPanel->Invalidate(); } } diff --git a/src/ui/inc/FUiCtrl_EditPresenter.h b/src/ui/inc/FUiCtrl_EditPresenter.h index 2a7acd4..2f2235a 100644 --- a/src/ui/inc/FUiCtrl_EditPresenter.h +++ b/src/ui/inc/FUiCtrl_EditPresenter.h @@ -549,7 +549,6 @@ private: static bool __isClipboardExist; static float __initialParentHeight; static float __clipboardHeight; - static bool __isPanelBoundsChanging; static _EditFooterVisibleStatus __initialFooterVisibleStatus; wchar_t __echoChar; -- 2.7.4