Fixing Jira Issue N_SE-45582.
authorkishorekumar Dachinamoorthy <kishore.d@samsung.com>
Wed, 10 Jul 2013 10:48:29 +0000 (16:18 +0530)
committerkishorekumar Dachinamoorthy <kishore.d@samsung.com>
Wed, 10 Jul 2013 12:16:50 +0000 (17:46 +0530)
Signed-off-by: kishorekumar Dachinamoorthy <kishore.d@samsung.com>
Change-Id: I38d7c201d40cb8979d98ba826302fd79214b79ca

src/ui/controls/FUiCtrl_Slider.cpp
src/ui/controls/FUiCtrl_SliderPresenter.cpp
src/ui/inc/FUiCtrl_SliderPresenter.h

index 45c39ce..2e589c8 100644 (file)
@@ -331,6 +331,15 @@ bool
 _Slider::OnFocusLost(const _Control& source)
 {
        __pSliderPresenter->SetFocusMode(false);
+
+       if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && (!__pSliderPresenter->IsTouchPressed()) && (__isKeyPressed == true))
+       {
+               _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay();
+               pSliderOverlay->SetVisibleState(false);
+               pSliderOverlay->Close();
+       }
+
+       __isKeyPressed = false;
        Invalidate();
 
        return true;
@@ -408,7 +417,7 @@ _Slider::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo)
 
        if (keyCode == _KEY_LEFT || keyCode == _KEY_RIGHT)
        {
-               if (GetStyle() & _SLIDER_STYLE_OVERLAY)
+               if ((GetStyle() & _SLIDER_STYLE_OVERLAY) &&  (__isKeyPressed == true))
                {
                        _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay();
                        pSliderOverlay->SetVisibleState(false);
index 4fddb17..3d5f0c1 100644 (file)
@@ -1459,6 +1459,12 @@ _SliderPresenter::GetSliderOverlay(void) const
 }
 
 bool
+_SliderPresenter::IsTouchPressed() const
+{
+       return __isSliderPressed;
+}
+
+bool
 _SliderPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
 {
        if (__pSlider != &source)
index 01ad006..fd8170f 100644 (file)
@@ -58,6 +58,7 @@ public:
        Tizen::Graphics::FloatRectangle GetTouchBounds(void) const;
 
        _SliderOverlay* GetSliderOverlay(void) const;
+       bool IsTouchPressed(void) const;
 
        virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
        virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);