Fix keypad event pair when using command button
authorTaejun <tj.twt.park@samsung.com>
Fri, 12 Apr 2013 15:02:23 +0000 (00:02 +0900)
committerTaejun <tj.twt.park@samsung.com>
Fri, 12 Apr 2013 15:02:23 +0000 (00:02 +0900)
Change-Id: Ic42d0c99c2ef1ad0a05106c7de11c435804cc8cb

src/ui/controls/FUiCtrl_EditPresenter.cpp

index 1877af0..12816e3 100755 (executable)
@@ -275,7 +275,11 @@ _EditPresenter::OnInputConnectionPanelShowStateChanged(InputConnection& source,
                        }
                }
 
-               if ((__isUSBKeyboardConnected && __isKeypadCommandButtonVisible) || (__isKeypadCommandButtonVisible && __pCommandButton &&  __pCommandButton->GetVisibleState()))
+               if ((__isUSBKeyboardConnected && __isKeypadCommandButtonVisible))
+               {
+                       __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
+               }
+               else if (__isKeypadCommandButtonVisible && __pCommandButton &&  __pCommandButton->GetVisibleState())//already command exist in usb mode
                {
                        __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
                }
@@ -6388,7 +6392,18 @@ _EditPresenter::ShowKeypad(bool focus)
 
                if (!__isKeypadExist)
                {
-                       if (__pCommandButton && !__pCommandButton->GetVisibleState())
+                       if (__isKeypadCommandButtonVisible)
+                       {
+                               if (!__pCommandButton || (__pCommandButton && !__pCommandButton->GetVisibleState()))
+                               {
+                                       __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
+                                       __pEdit->AttachScrollPanelEvent();
+                                       __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED);
+                                       __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
+                                       __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
+                               }
+                       }
+                       else
                        {
                                __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
                                __pEdit->AttachScrollPanelEvent();