(ScrollView) Stop detecting pinch gestures. 68/19968/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 22 Apr 2014 16:10:39 +0000 (17:10 +0100)
committerAndrew Cox <andrew.cox@partner.samsung.com>
Wed, 23 Apr 2014 19:11:41 +0000 (20:11 +0100)
[Problem]  Scroll view detects pinch gestures even though it does not do anything with them.
[Cause]    N/A
[Solution] Stop pinch detection in scroll-view.

Signed-off-by: Andrew Cox <andrew.cox@partner.samsung.com>
Change-Id: I7c0b1070408baa5002acc32e992ce32122af43a5

dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h

index 82b647f..16b54ae 100644 (file)
@@ -574,7 +574,7 @@ void ScrollView::OnInitialize()
 
   mGestureStackDepth = 0;
 
-  EnableGestureDetection( Gesture::Type( Gesture::Pan | Gesture::Pinch ) );
+  EnableGestureDetection( Gesture::Type( Gesture::Pan ) );
 
   // For pan, default to only 1 touch required, ignoring touches outside this range.
   SetTouchesRequiredForPanning(1, 1, false);
@@ -915,19 +915,16 @@ void ScrollView::SetScrollSensitive(bool sensitive)
 {
   Actor self = Self();
   PanGestureDetector panGesture( GetPanGestureDetector() );
-  PinchGestureDetector pinchGesture( GetPinchGestureDetector() );
 
   if((!mSensitive) && (sensitive))
   {
     mSensitive = sensitive;
     panGesture.Attach(self);
-    pinchGesture.Attach(self);
   }
   else if((mSensitive) && (!sensitive))
   {
     mSensitive = sensitive;
     panGesture.Detach(self);
-    pinchGesture.Detach(self);
 
     mGestureStackDepth = 0;
     self.SetProperty(mPropertyPanning, false);
@@ -2177,11 +2174,6 @@ void ScrollView::OnPan(PanGesture gesture)
   OnGestureEx(gesture.state);
 }
 
-void ScrollView::OnPinch(PinchGesture gesture)
-{
-  // TODO: Reintroduce the pinch functionality for scaling.
-}
-
 void ScrollView::OnGestureEx(Gesture::State state)
 {
   // call necessary signals for application developer
index 23bc81f..a18a6e2 100644 (file)
@@ -604,13 +604,6 @@ private:
   void OnPan(PanGesture pan);
 
   /**
-   * Called up pinch gesture event.
-   *
-   * @param[in] gesture The gesture event.
-   */
-  void OnPinch(PinchGesture gesture);
-
-  /**
    * Extension of the above gestures.
    *
    * @param[in] gesture The gesture event.