changeset 507:d6de9ab3ce2a

Fixed a small problem with the fife timer library. There was a problem with UH when clicking on certain buttons on the main menu which cased a hang/crash. The timer now stops itself before executing the callback.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 19 May 2010 15:10:34 +0000
parents 226e26d1d11e
children c8820cc201db
files engine/python/fife/extensions/fife_timer.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/engine/python/fife/extensions/fife_timer.py	Wed May 19 14:34:35 2010 +0000
+++ b/engine/python/fife/extensions/fife_timer.py	Wed May 19 15:10:34 2010 +0000
@@ -103,14 +103,17 @@
 		"""
 		Should not be called directly.  This is called by FIFE.
 		"""
-		if callable(self._callback):
-			self._callback()
-			
 		if self._repeat != 0:
 			self._executed += 1
 			if self._executed >= self._repeat:
+				print "in here"
 				self.stop()
 
+		if callable(self._callback):
+			print "calling event"
+			self._callback()
+
+
 def delayCall(delay,callback):
 	"""
 	Delay a function call by a number of milliseconds.