- Bugfix: to often recomputation of stuff.
This commit is contained in:
parent
d6fde09885
commit
ad5e081f83
@ -49,10 +49,14 @@ class AttackDisplay(wx.ScrolledWindow):
|
|||||||
self.Fit()
|
self.Fit()
|
||||||
|
|
||||||
def OnSize(self,event):
|
def OnSize(self,event):
|
||||||
self.update()
|
self.update(False)
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
|
||||||
def update(self):
|
def update(self,force=True):
|
||||||
|
|
||||||
|
if not force:
|
||||||
|
if not self.win.fit:
|
||||||
|
return
|
||||||
|
|
||||||
self.SetScrollbars(0,0,0,0,0,0)
|
self.SetScrollbars(0,0,0,0,0,0)
|
||||||
(sw,sh) = self.GetClientSizeTuple()
|
(sw,sh) = self.GetClientSizeTuple()
|
||||||
@ -174,9 +178,9 @@ class AttackWindow(wx.Frame):
|
|||||||
|
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
|
|
||||||
def update(self):
|
def update(self,force=False):
|
||||||
for t in self.displays:
|
for t in self.displays:
|
||||||
t.update()
|
t.update(force)
|
||||||
|
|
||||||
def OnFit(self,event):
|
def OnFit(self,event):
|
||||||
|
|
||||||
@ -184,24 +188,24 @@ class AttackWindow(wx.Frame):
|
|||||||
self.fit = False
|
self.fit = False
|
||||||
else:
|
else:
|
||||||
self.fit = True
|
self.fit = True
|
||||||
self.update()
|
self.update(True)
|
||||||
|
|
||||||
def OnRealSize(self):
|
def OnRealSize(self):
|
||||||
|
|
||||||
self.fit = False
|
self.fit = False
|
||||||
self.update()
|
self.update(True)
|
||||||
|
|
||||||
def OnSize(self):
|
def OnSize(self):
|
||||||
self.Refresh()
|
self.Refresh()
|
||||||
|
|
||||||
def OnZoom100(self,evt):
|
def OnZoom100(self,evt):
|
||||||
self.fit = False
|
self.fit = False
|
||||||
self.update()
|
self.update(True)
|
||||||
self.Refresh()
|
self.Refresh()
|
||||||
|
|
||||||
def OnZoomFit(self,evt):
|
def OnZoomFit(self,evt):
|
||||||
self.fit = True
|
self.fit = True
|
||||||
self.update()
|
self.update(True)
|
||||||
self.Refresh()
|
self.Refresh()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user