Skip to content

Commit

Permalink
Clear Actor's image cache when image changed
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesej authored and lordmauve committed Apr 27, 2019
1 parent 0adf4ee commit a3aabc9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pgzero/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ def image(self):
def image(self, image):
self._image_name = image
self._orig_surf = loaders.images.load(image)
self._surface_cache.clear() # Clear out old image's cache.
self._update_pos()

def _update_pos(self):
Expand Down

0 comments on commit a3aabc9

Please sign in to comment.