Fix for N_SE-49065: Implemented OnFocusModeStateChanged
authorVinay Dutt Vyas <vinay.vyas@samsung.com>
Tue, 27 Aug 2013 06:21:29 +0000 (11:51 +0530)
committerVinay Dutt Vyas <vinay.vyas@samsung.com>
Tue, 27 Aug 2013 11:08:11 +0000 (16:38 +0530)
Signed-off-by: Vinay Dutt Vyas <vinay.vyas@samsung.com>
Change-Id: I908675c54ec7b242727c969a961f6907872a7dc3

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

index f0cba0e..c8331bf 100644 (file)
@@ -1600,16 +1600,7 @@ _TableViewItem::OnTouchCanceled(const _Control& source, const _TouchInfo& touchi
        __annexOnOffHandlerMoved = false;
        __itemTouchMoved = false;
 
-       __itemSelected = false;
-       __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
-
-       if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
-       {
-               __isSelectedDetailButton = false;
-       }
-
-       SetItemChanged(true);
-       Invalidate();
+       ResetItemState();
 
        if (&source != this)
        {
@@ -5135,6 +5126,29 @@ _TableViewItem::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
        return false;
 }
 
+void
+_TableViewItem::OnFocusModeStateChanged(void)
+{
+       __releasedControl = TABLE_VIEW_ITEM_PRESSED_NONE;
+
+       ResetItemState();
+}
+
+void
+_TableViewItem::ResetItemState(void)
+{
+       __itemSelected = false;
+       __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
+
+       if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
+       {
+               __isSelectedDetailButton = false;
+       }
+
+       SetItemChanged(true);
+       Invalidate();
+}
+
 _Control*
 _TableViewItem::GetPreviousFocusChildControl(const _Control& source)
 {
index 544c176..abe42f9 100644 (file)
@@ -302,11 +302,13 @@ 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 OnFocusModeStateChanged(void);
 
        bool SetItemTapSoundEnabled(bool tapSoundEnabled);
        bool GetItemTapSoundEnabled(void);
 
        void DrawAnnexFocus(void);
+       void ResetItemState(void);
 
        virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds);