# HG changeset patch # User Laurent Bessard # Date 1367309356 -7200 # Node ID 9789531bc57c232a111da676abf7f843259b06c3 # Parent 5ec20f56b1d238f1eb195ccb9d5bcf3b4546c184 Fixed bug when quitting project with more than one LD Viewer opened diff -r 5ec20f56b1d2 -r 9789531bc57c editors/LDViewer.py --- a/editors/LDViewer.py Tue Apr 30 09:49:52 2013 +0200 +++ b/editors/LDViewer.py Tue Apr 30 10:09:16 2013 +0200 @@ -184,17 +184,17 @@ def RefreshView(self, variablepanel=True, selection=None): Viewer.RefreshView(self, variablepanel, selection) - wx.CallAfter(self.Refresh) - for i, rung in enumerate(self.Rungs): - bbox = rung.GetBoundingBox() - if i < len(self.RungComments): - if self.RungComments[i]: - pos = self.RungComments[i].GetPosition() - if pos[1] > bbox.y: - self.RungComments.insert(i, None) - else: - self.RungComments.insert(i, None) - + if self.GetDrawingMode() != FREEDRAWING_MODE: + for i, rung in enumerate(self.Rungs): + bbox = rung.GetBoundingBox() + if i < len(self.RungComments): + if self.RungComments[i]: + pos = self.RungComments[i].GetPosition() + if pos[1] > bbox.y: + self.RungComments.insert(i, None) + else: + self.RungComments.insert(i, None) + def loadInstance(self, instance, ids, selection): Viewer.loadInstance(self, instance, ids, selection) if self.GetDrawingMode() != FREEDRAWING_MODE: