Merge "(TextController) Fixed SVACE errors in EventHandler" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 24 Aug 2021 13:30:33 +0000 (13:30 +0000)
committerGerrit Code Review <gerrit@review>
Tue, 24 Aug 2021 13:30:33 +0000 (13:30 +0000)
dali-toolkit/internal/text/text-controller-impl-event-handler.cpp

index 06898b6..e24e8aa 100644 (file)
@@ -839,7 +839,7 @@ void ControllerImplEventHandler::OnHandlePressed(Controller::Impl& impl, const E
     eventData.mIsRightHandleSelected = true;
   }
 
-  if((impl.mSelectableControlInterface != nullptr) || eventData.mUpdateRightSelectionPosition || eventData.mUpdateLeftSelectionPosition)
+  if((impl.mSelectableControlInterface != nullptr) && ((oldStart != eventData.mLeftSelectionPosition) || (oldEnd != eventData.mRightSelectionPosition)))
   {
     impl.mSelectableControlInterface->SelectionChanged(oldStart, oldEnd, eventData.mLeftSelectionPosition, eventData.mRightSelectionPosition);
   }
@@ -926,7 +926,7 @@ void ControllerImplEventHandler::OnHandleReleased(Controller::Impl& impl, const
     }
   }
 
-  if((impl.mSelectableControlInterface != nullptr) || eventData.mUpdateRightSelectionPosition || eventData.mUpdateLeftSelectionPosition)
+  if((impl.mSelectableControlInterface != nullptr) && ((oldStart != eventData.mLeftSelectionPosition) || (oldEnd != eventData.mRightSelectionPosition)))
   {
     impl.mSelectableControlInterface->SelectionChanged(oldStart, oldEnd, eventData.mLeftSelectionPosition, eventData.mRightSelectionPosition);
   }