1616limitations under the License.
1717
1818@author: Diego Torres Milano
19+
1920'''
2021
21- __version__ = '8.12.3 '
22+ __version__ = '8.12.4 '
2223
2324import sys
2425import threading
@@ -831,6 +832,9 @@ def onGrabEp(self):
831832 def onGrab (self , entry ):
832833 '''
833834 Generic grab method.
835+
836+ @param entry: the entry being grabbed
837+ @type entry: Tkinter.Entry
834838 '''
835839
836840 self .culebron .setOnTouchListener (self .onTouchListener )
@@ -840,9 +844,12 @@ def onGrab(self, entry):
840844 def onTouchListener (self , point ):
841845 '''
842846 Listens for touch events and draws the corresponding shapes on the Culebron canvas.
843- If the starting point is being grabbed it draws the toucing point via
847+ If the starting point is being grabbed it draws the touching point via
844848 C{Culebron.drawTouchedPoint()} and if the end point is being grabbed it draws
845849 using C{Culebron.drawDragLine()}.
850+
851+ @param point: the point touched
852+ @type point: tuple
846853 '''
847854
848855 x = point [0 ]
@@ -852,9 +859,11 @@ def onTouchListener(self, point):
852859 self .onValidate (value )
853860 self .culebron .setGrab (False )
854861 if self .__grabbing == self .sp :
862+ self .__cleanUpSpId ()
855863 self .spX = x
856864 self .spY = y
857865 elif self .__grabbing == self .ep :
866+ self .__cleanUpEpId ()
858867 self .epX = x
859868 self .epY = y
860869 if self .spX and self .spY and not self .spId :
@@ -864,11 +873,19 @@ def onTouchListener(self, point):
864873 self .__grabbing = None
865874 self .culebron .setOnTouchListener (None )
866875
867- def cleanUp (self ):
876+ def __cleanUpSpId (self ):
868877 if self .spId :
869878 self .culebron .canvas .delete (self .spId )
879+ self .spId = None
880+
881+ def __cleanUpEpId (self ):
870882 if self .epId :
871883 self .culebron .canvas .delete (self .epId )
884+ self .epId = None
885+
886+ def cleanUp (self ):
887+ self .__cleanUpSpId ()
888+ self .__cleanUpEpId ()
872889
873890
874891class HelpDialog (Tkinter .Toplevel ):
0 commit comments