Fix layout problem with prediction&USB mode
authorTaejun <tj.twt.park@samsung.com>
Fri, 19 Apr 2013 09:25:55 +0000 (18:25 +0900)
committerTaejun <tj.twt.park@samsung.com>
Fri, 19 Apr 2013 09:25:55 +0000 (18:25 +0900)
Change-Id: I41c7c968f1baa0688881e034a7b6b2b0fc1a7385

src/ui/controls/FUiCtrl_EditPresenter.cpp

index a95ec14..2194639 100644 (file)
@@ -1025,10 +1025,7 @@ _EditPresenter::Dispose(void)
                        }
                }
 
-               if (__pEdit && !__pEdit->IsDestroyed())//restore ScrollPanel when force deleted
-               {
-                       AdjustParentPanelHeight(true);
-               }
+               AdjustParentPanelHeight(true);
 
                __isKeypadExist = false;
                __initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE;
@@ -6367,23 +6364,34 @@ _EditPresenter::ShowKeypad(bool focus)
        if (__isUSBKeyboardConnected)
        {
                SysLog(NID_UI_CTRL, "[EDIT]ShowKeypad called in USB ON mode!!!!");
+
+               __isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); //prediction alreaedy exists
+
                if (__initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_NONE)
                {
                        CheckInitialFooterVisibleState();
                }
 
-               if (__isKeypadCommandButtonVisible)
+               if (__isKeypadExist)
                {
-                       __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
-                       __pEdit->AttachScrollPanelEvent();
-                       __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED);
+                       if (__isKeypadCommandButtonVisible)
+                       {
+                               __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
+                               __pEdit->AttachScrollPanelEvent();
+                               __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED);
 
-                       SetFooterVisible(false);
-                       ChangeLayoutInternal(__pEdit->GetOrientation());
-                       AdjustParentPanelHeight(false);
+                               SetFooterVisible(false);
+                               ChangeLayoutInternal(__pEdit->GetOrientation());
+                               AdjustParentPanelHeight(false);
 
-                       __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
-                       __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
+                               __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
+                               __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
+                       }
+                       else
+                       {
+                               ChangeLayoutInternal(__pEdit->GetOrientation());
+                               AdjustParentPanelHeight(false);
+                       }
                }
 
                ScrollPanelToCursorPosition();
@@ -6428,7 +6436,7 @@ _EditPresenter::ShowKeypad(bool focus)
                if (__isKeypadExist)
                {
                        ChangeLayoutInternal(__pEdit->GetOrientation());
-                       //ChangeLayoutInternal(__pEdit->GetOrientation(), false);
+                       AdjustParentPanelHeight(false);
                        ScrollPanelToCursorPosition();
                        if (__pParentForm)
                        {