Removed Unnecessary code
authorDebajit Das <debajit.das@samsung.com>
Thu, 17 Oct 2013 11:09:19 +0000 (16:39 +0530)
committerDebajit Das <debajit.das@samsung.com>
Fri, 18 Oct 2013 11:51:14 +0000 (17:21 +0530)
Signed-off-by: Debajit Das <debajit.das@samsung.com>
Change-Id: I10c9a0cd59e3066c25852bc0d09590e168ce1d61

src/ui/controls/FUiCtrl_SliderPresenter.cpp

index f62a1a1..dde5b59 100644 (file)
@@ -1446,17 +1446,6 @@ _SliderPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touc
 
        FloatPoint point = touchinfo.GetCurrentPosition();
 
-       Canvas* pCanvas = __pSlider->GetCanvasN();
-       SysTryReturn(NID_UI_CTRL, pCanvas != null, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the canvas.");
-
-       if (point.x >= (pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width))
-       {
-               point.x = pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width;
-       }
-
-       delete pCanvas;
-       pCanvas = null;
-
        if (__isSliderPressed)
        {
                PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pSlider);
@@ -1516,14 +1505,6 @@ _SliderPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchin
 
        FloatPoint point = touchinfo.GetCurrentPosition();
 
-       Canvas* pCanvas = __pSlider->GetCanvasN();
-       SysTryReturn(NID_UI_CTRL, pCanvas != null, true, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the canvas.");
-
-       if (point.x >= (pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width))
-       {
-               point.x = pCanvas->GetBoundsF().x + pCanvas->GetBoundsF().width;
-       }
-
        int candidateValue = CalculateSliderValue(point.x, __handleRect.width / 2);
 
        __pSliderModel->SetValue(candidateValue);
@@ -1533,9 +1514,6 @@ _SliderPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchin
 
        __pSlider->FireSliderMoveEvent(candidateValue);
 
-       delete pCanvas;
-       pCanvas = null;
-
        return true;
 }