Fix N_SE-44077/44375
authorTaejun <tj.twt.park@samsung.com>
Wed, 3 Jul 2013 05:43:41 +0000 (14:43 +0900)
committerTaejun <tj.twt.park@samsung.com>
Wed, 3 Jul 2013 05:43:41 +0000 (14:43 +0900)
Change-Id: I9d16020465f347a087f06f0a2ccf4d2e4a1a9990

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

index 1066d04..73cc1b0 100755 (executable)
@@ -108,6 +108,7 @@ _EditFooterVisibleStatus _EditPresenter::__initialFooterVisibleStatus = EDIT_FOO
 bool _EditPresenter::__footerVisibleChanged = false;
 unsigned int _EditPresenter::__latestBoundedContext = null;
 const float _EditPresenter::TOUCH_PRESS_THRESHOLD_IN_CLEAR_AREA = 0.04f;
+_ScrollPanel* _EditPresenter::__pResizedPanel = null;
 
 _EditAnimationProvider::_EditAnimationProvider(void)
 {
@@ -7512,6 +7513,12 @@ _EditPresenter::AdjustParentPanelHeight(bool restore)
                return;
        }
 
+       float initialParentHeight = __initialParentHeight;
+       if (__pResizedPanel != __pParentPanel)
+       {
+               initialParentHeight = 0.0f;
+       }
+
        _ControlOrientation orientation;
        float commandButtonHeight = 0.0f;
 
@@ -7545,11 +7552,12 @@ _EditPresenter::AdjustParentPanelHeight(bool restore)
 
        if (restore)
        {
-               if (__initialParentHeight)
+               if (initialParentHeight)
                {
                        scrollPanelBounds.height = __initialParentHeight;
                        SysLog(NID_UI_CTRL, "Rollback ScrollPanel's height to %f and Set __initialParentHeight to 'Zero' ", __initialParentHeight);
                        __initialParentHeight = 0.0f;
+                       __pResizedPanel = null;
                        __pParentPanel->SetBounds(scrollPanelBounds);
                        __pParentPanel->Invalidate();
                }
@@ -7606,7 +7614,7 @@ _EditPresenter::AdjustParentPanelHeight(bool restore)
 
                SysLog(NID_UI_CTRL, "IsOverlapped:(%d), __initialParentHeight:(%f), gapY:(%f)", isOverlapped, __initialParentHeight, gapY);
 
-               if (!__initialParentHeight)
+               if (!initialParentHeight)
                {
                        if (!isOverlapped)
                        {
@@ -7615,7 +7623,9 @@ _EditPresenter::AdjustParentPanelHeight(bool restore)
 
                        if (gapY > 0.0f)
                        {
-                               __initialParentHeight = scrollPanelBounds.height;
+                               initialParentHeight = scrollPanelBounds.height;
+                               __initialParentHeight = initialParentHeight;
+                               __pResizedPanel = __pParentPanel;
 
                                SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f and Set __initialParentHeight:(%f)", gapY, __initialParentHeight);
 
@@ -7628,7 +7638,7 @@ _EditPresenter::AdjustParentPanelHeight(bool restore)
                {
                        if (!isOverlapped)
                        {
-                               if ((gapY < __initialParentHeight) && (gapY > 0.0f))
+                               if ((gapY < initialParentHeight) && (gapY > 0.0f))
                                {
                                        SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f", gapY);
 
@@ -7639,11 +7649,11 @@ _EditPresenter::AdjustParentPanelHeight(bool restore)
                                }
                                else
                                {
-                                       if (gapY > __initialParentHeight)
+                                       if (gapY > initialParentHeight)
                                        {
                                                SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f", __initialParentHeight);
 
-                                               scrollPanelBounds.height = __initialParentHeight;
+                                               scrollPanelBounds.height = initialParentHeight;
                                                __pParentPanel->SetBounds(scrollPanelBounds);
                                                __pParentPanel->Invalidate();
                                        }
index 0941182..de732ae 100755 (executable)
@@ -555,6 +555,7 @@ private:
        static bool __footerVisibleChanged;
        static unsigned int __latestBoundedContext;
        static const float TOUCH_PRESS_THRESHOLD_IN_CLEAR_AREA;
+       static _ScrollPanel* __pResizedPanel;
 
        wchar_t __echoChar;