fixed JIRA N_SE-45141
authorvipul <vipul.kumar@samsung.com>
Mon, 8 Jul 2013 08:08:13 +0000 (13:38 +0530)
committervipul <vipul.kumar@samsung.com>
Mon, 8 Jul 2013 08:19:22 +0000 (13:49 +0530)
Signed-off-by: vipul <vipul.kumar@samsung.com>
Change-Id: I36633ba0aea8203722303fa7f74541027860bd3f

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

index cc4cb04..b8a23dc 100644 (file)
@@ -1165,6 +1165,33 @@ _ContextMenuListPresenter::OnKeyPressed(const _Control& source, const _KeyInfo&
 
                break;
        }
+       case _KEY_TAB:
+       {
+               if (__enterKeyPressed)
+               {
+                       __enterKeyPressed = false;
+                       _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex);
+                       if (pItem != null)
+                       {
+                               pItem->SetAndInvalidate(false);
+                       }
+               }
+
+               __focusedIndex = 0;
+
+               _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex);
+               if(pItem == null)
+               {
+                       __focusedIndex = -1;
+                       break;
+               }
+
+               pItem->SetFocused(true);
+               pItem->DrawFocus();
+               __pContextMenu->GetScrollPanel()->OnChildControlFocusMoved(*pItem);
+
+               break;
+       }
        case _KEY_ENTER:
        {
                __enterKeyPressed = true;
@@ -1223,6 +1250,8 @@ _ContextMenuListPresenter::OnKeyReleased(const _Control& source, const _KeyInfo&
        case _KEY_DOWN:
                // fall through
        case _KEY_BACKSPACE:
+               // fall through
+       case _KEY_TAB:
                break;
        case _KEY_ENTER:
        {
@@ -1316,24 +1345,6 @@ _ContextMenuListPresenter::IsChildControlFocusManage(void) const
 }
 
 void
-_ContextMenuListPresenter::OnDrawFocus(void)
-{
-       _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex);
-       if (pItem == null)
-       {
-               __focusedIndex = 0;
-               pItem = __pModel->GetItem(__focusedIndex);
-       }
-
-       if (pItem != null)
-       {
-               pItem->SetFocused(true);
-               pItem->DrawFocus();
-               __pContextMenu->GetScrollPanel()->OnChildControlFocusMoved(*pItem);
-       }
-}
-
-void
 _ContextMenuListPresenter::OnFocusModeStateChanged(void)
 {
         _Control* pFocusedControl = null;
index 6e9031e..4e5f803 100644 (file)
@@ -82,7 +82,6 @@ public:
        virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
        virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
        virtual bool IsChildControlFocusManage(void) const;
-       virtual void OnDrawFocus(void);
        virtual void OnFocusModeStateChanged(void);
 
        virtual void OnFontChanged(Tizen::Graphics::Font* pFont);