Fix for bug introduced with DrawImage. Was not deleting the figures, at all.

This commit is contained in:
MikeTheWatchGuy 2019-06-12 19:51:25 -04:00
parent 7a16885e43
commit a1095b8ad0
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: