Fixed widget button onclick register so it only will ever register a callback once.

This commit is contained in:
Jonathan Frederic 2013-11-06 09:41:46 -08:00
parent 35fc3af84f
commit 8279db0eb0

View File

@ -53,7 +53,7 @@ class ButtonWidget(Widget):
Set to true to remove the callback from the list of callbacks."""
if remove:
self._click_handlers.remove(callback)
else:
elif not callback in self._click_handlers:
self._click_handlers.append(callback)