From: Saravana Balaji Date: Tue, 16 Apr 2013 15:11:32 +0000 (+0530) Subject: Fix for N_SE-34443 X-Git-Tag: accepted/tizen_2.1/20130425.033138~157^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16f3540ca2d199f12f6b726112a37df305165e8e;p=framework%2Fosp%2Fuifw.git Fix for N_SE-34443 Change-Id: I742209d38f30131061eab5309788233167050b7b Signed-off-by: Saravana Balaji --- diff --git a/src/ui/controls/FUiCtrl_EditPresenter.cpp b/src/ui/controls/FUiCtrl_EditPresenter.cpp index 86d6acd..0ae63c3 100755 --- a/src/ui/controls/FUiCtrl_EditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditPresenter.cpp @@ -183,7 +183,6 @@ _EditPresenter::_EditPresenter(void) , __isCursorInitialized(false) , __isCursorDisabled(false) , __isInitialized(false) - , __isInitializing(false) , __isMovingCursorByTouchMove(false) , __isTouchMoving(false) , __isTouchPressed(false) @@ -198,7 +197,6 @@ _EditPresenter::_EditPresenter(void) , __isKeypadHiding(false) , __blockStartPos(0) , __cursorPos(0) - , __maximumFlexibleHeight(-1.0f) , __prevTotalTextHeight(-1.0f) , __textLength(0) , __composingTextLength(0) @@ -1317,8 +1315,6 @@ _EditPresenter::Initialize(const _Control& control) __pTextObject->SetBounds(__textObjectBounds); __pTextObject->HideRearSpace(TEXT_OBJECT_SPACE_HIDE_TYPE_NONE); - __maximumFlexibleHeight = GetMaxLineCount() * __pFont->GetMaxHeight() + __verticalMargin; - __pEditVEDelegator = new (std::nothrow) _EditAnimationProvider(); SysTryCatch(NID_UI_CTRL, __pEditVEDelegator, , E_OUT_OF_MEMORY, "Memory allocation failed."); @@ -1351,8 +1347,6 @@ _EditPresenter::InitializeAtFirstDrawing(void) { result r = E_SUCCESS; - __isInitializing = true; - Resize(); InitializeParentPanel(); @@ -1361,8 +1355,7 @@ _EditPresenter::InitializeAtFirstDrawing(void) if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false && (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE)) { - r = AdjustFlexibleHeight(); - SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Faild to adjust flexible height."); + AdjustFlexibleHeight(); } ReplaceTextIntoPasswordHyphenString(); @@ -8567,11 +8560,6 @@ _EditPresenter::AdjustFlexibleHeight(void) return E_SYSTEM; } - if (__maximumFlexibleHeight > 0 && __maximumFlexibleHeight <= __initialBounds.height) - { - return E_SYSTEM; - } - __pTextObject->Compose(); if (__prevTotalTextHeight == __pTextObject->GetTotalHeightF()) // if text height has not changed. @@ -8599,11 +8587,6 @@ _EditPresenter::SetFlexBounds(const Rectangle& bounds) { result r = E_SUCCESS; - if (!__isInitializing) - { - return E_SUCCESS; - } - _ExpandableEditAreaEventStatus expandableEditAreaStatus = _EXPANDABLE_EDITAREA_EVENT_ADDED; if (__pEdit->GetBounds().height > bounds.height) { @@ -8645,11 +8628,6 @@ _EditPresenter::SetFlexBounds(const FloatRectangle& bounds) { result r = E_SUCCESS; - if (!__isInitializing) - { - return E_SUCCESS; - } - _ExpandableEditAreaEventStatus expandableEditAreaStatus = _EXPANDABLE_EDITAREA_EVENT_ADDED; if (__pEdit->GetBoundsF().height > bounds.height) { @@ -8690,16 +8668,11 @@ _EditPresenter::SetFlexBounds(const FloatRectangle& bounds) float _EditPresenter::CalculateMaximumFlexibleHeight(void) { - float maxHeight = __maximumFlexibleHeight; + float maxHeight = 0.0f; float expectedEditHeight = __pTextObject->GetTotalHeightF() + __verticalMargin; int maximumFlexibleLineNumber = GetMaxLineCount(); - // if height is longer than max height. - if (maxHeight > 0 && expectedEditHeight >= maxHeight) - { - maxHeight = __maximumFlexibleHeight; - } - else if (maximumFlexibleLineNumber > 0) // if max line number is set. + if (maximumFlexibleLineNumber > 0) // if max line number is set. { maxHeight = maximumFlexibleLineNumber * __pTextObject->GetLineHeightAtF(0) + __verticalMargin; diff --git a/src/ui/inc/FUiCtrl_EditPresenter.h b/src/ui/inc/FUiCtrl_EditPresenter.h index 71ad96a..12c8537 100644 --- a/src/ui/inc/FUiCtrl_EditPresenter.h +++ b/src/ui/inc/FUiCtrl_EditPresenter.h @@ -517,7 +517,6 @@ private: bool __isCursorDisabled; // todo : check InitAtFirstDrawing bool __isInitialized; - bool __isInitializing; // todo : check bool __isMovingCursorByTouchMove; bool __isTouchMoving; @@ -534,7 +533,6 @@ private: int __blockStartPos; int __cursorPos; - float __maximumFlexibleHeight; float __prevTotalTextHeight; int __textLength; int __composingTextLength;