Merge pull request #1545 from PySimpleGUI/Dev-latest

Fix for bug introduced with DrawImage.  Was not deleting the figures,…
This commit is contained in:
MikeTheWatchGuy 2019-06-12 19:51:47 -04:00 committed by GitHub
commit a147362c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -2247,10 +2247,12 @@ class Graph(Element):
def DeleteFigure(self, id):
try:
del self.Images[id]
self._TKCanvas2.delete(id)
except:
print('DeleteFigure - bad ID {}'.format(id))
try:
del self.Images[id] # in case was an image. If wasn't an image, then will get exception
except: pass
def Update(self, background_color, visible=None):
if self._TKCanvas2 is None: