[Tizen] Remove unused containers - old pan gesture history 87/312687/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 13 Jun 2024 05:00:49 +0000 (14:00 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Thu, 13 Jun 2024 05:00:49 +0000 (14:00 +0900)
Change-Id: Ic21880e9f34e23510c991b760929b43696611633
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/update/gestures/scene-graph-pan-gesture.cpp

index 622948f2a89edfa953de48c36822dc0f84ddf1d2..f987d21b9426012b4730d89a0b54e1d5dde4b6a5 100644 (file)
@@ -266,6 +266,11 @@ bool PanGesture::ReadGestures(FrameGestureInfo& info, unsigned int currentTimest
     if(currentGesture.state == GestureState::STARTED)
     {
       info.justStarted = true;
+
+      // Clear pan data.
+      mPanHistory.clear();
+      mPredictionHistory.clear();
+
       // clear just finished as we have started new pan
       info.justFinished = false;
     }
@@ -301,9 +306,14 @@ bool PanGesture::ReadAndResampleGestures(FrameGestureInfo& info, unsigned int cu
 
     if(lastReadGesture.state == GestureState::STARTED)
     {
+      info.justStarted  = true;
+
+      // Clear pan data.
+      mPanHistory.clear();
+      mPredictionHistory.clear();
+
       // Clear just finished as we have started new pan.
       info.justFinished = false;
-      info.justStarted  = true;
     }
     else
     {