File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -492,7 +492,12 @@ def executeGesture(self, gesture):
492492 queueHandler .queueFunction (queueHandler .eventQueue , speech .speakMessage , gesture .displayName )
493493
494494 gesture .reportExtra ()
495-
495+
496+ # Clear memorized last script to avoid getLastScriptRepeatCount return multiple press
497+ # when an unbound gesture is executed between 2 bound gestures.
498+ if not script :
499+ scriptHandler .clearLastScript ()
500+
496501 # #2953: if an intercepted command Script (script that sends a gesture) is queued
497502 # then queue all following gestures (that don't have a script) with a fake script so that they remain in order.
498503 if not script and scriptHandler ._numIncompleteInterceptedCommandScripts :
Original file line number Diff line number Diff line change @@ -224,6 +224,11 @@ def getLastScriptRepeatCount():
224224 else :
225225 return _lastScriptCount
226226
227+ def clearLastScript ():
228+ global _lastScriptRef , _lastScriptCount
229+ _lastScriptRef = None
230+ _lastScriptCount = 0
231+
227232def isScriptWaiting ():
228233 return bool (_numScriptsQueued )
229234
You can’t perform that action at this time.
0 commit comments