, __isTitleSliding(false)
, __touchPressInfo(FloatPoint(-1.0f, -1.0f))
, __editContentFontSize(0.0f)
+ , __trackTokenIndex(-1)
{
}
else if (index == __pressedTokenIndex)
{
__pressedTokenIndex = -1;
+ StopCursorTimer();
+ SetCursorDisabled(false);
+ StartCursorTimer();
}
return r;
_TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _TouchInfo& touchinfo)
{
int tokenIndex = GetTokenIndexFromCoordinate(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()));
+
+ //Reset "longPressed" when Touch released on a different token after long gesture on a token
+ if (__trackTokenIndex != tokenIndex)
+ {
+ __isLongPressed = false;
+ }
+
int prevPressedTokenIndex = __pressedTokenIndex;
int prevEditedTokenIndex = __edittingTokenIndex;
_TokenEditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
int tokenIndex = GetTokenIndexFromCoordinate(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()));
+ __trackTokenIndex = tokenIndex;
_TouchInfo TouchInfo(touchinfo);
if (tokenIndex != -1)
}
__isTouchMoveInProgress = false;
+ __trackTokenIndex = -1;
return false;
}
if (__pressedTokenIndex >= 0 && __edittingTokenIndex < 0 && !__isEditingToken)
{
RemoveTokenAt(__pressedTokenIndex);
- if (__pressedTokenIndex < 0)
- {
- StopCursorTimer();
- SetCursorDisabled(false);
- StartCursorTimer();
- }
__pTokenEdit->Invalidate();
return;
}
return true;
}
+ //Discard all long press that is detected after Touch press on a token
+ if (__trackTokenIndex >= 0)
+ {
+ return true;
+ }
+
__isLongPressed = true;
//Uncomment below to Block Copy & Paste functionality in Token Edit mode