Merge pull request #633 from kivy/attribute_keep_data

Core: Image: skip keep_data check for images created from texture
This commit is contained in:
Mathieu Virbel 2012-08-09 06:48:23 -07:00
commit 5d6b2166fb
1 changed files with 4 additions and 1 deletions

View File

@ -569,7 +569,10 @@ class Image(EventDispatcher):
if image: if image:
# we found an image, yeah ! but reset the texture now. # we found an image, yeah ! but reset the texture now.
self.image = image self.image = image
if not image.keep_data and self._keep_data: # if image.__class__ is core image then it's a texture
# from atlas or other sources and has no data so skip
if (image.__class__ != self.__class__ and
not image.keep_data and self._keep_data):
self.remove_from_cache() self.remove_from_cache()
self._filename = '' self._filename = ''
self._set_filename(value) self._set_filename(value)