Merge branch 'master' of github.com:tito/kivy

This commit is contained in:
Mathieu Virbel 2011-11-22 10:11:50 +01:00
commit 119c595944
1 changed files with 3 additions and 1 deletions

View File

@ -237,6 +237,7 @@ class AsyncImage(Image):
def on_source(self, instance, value): def on_source(self, instance, value):
if not value: if not value:
self._coreimage.unbind(on_texture=self._on_tex_change)
self.texture = None self.texture = None
self._coreimage = None self._coreimage = None
else: else:
@ -258,4 +259,5 @@ class AsyncImage(Image):
return proto in ('http', 'https', 'ftp') return proto in ('http', 'https', 'ftp')
def _on_tex_change(self, *largs): def _on_tex_change(self, *largs):
self.texture = self._coreimage.texture if self._coreimage:
self.texture = self._coreimage.texture