- Minor fixes.

This commit is contained in:
ccremers 2006-08-08 15:14:51 +00:00
parent 89acf05fe1
commit 0b21755928
2 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,8 @@ class AttackDisplay(wx.ScrolledWindow):
self.hbox.Add(self.box,1,wx.ALIGN_CENTER) self.hbox.Add(self.box,1,wx.ALIGN_CENTER)
self.SetSizer(self.hbox) self.SetSizer(self.hbox)
self.original = None
filename = attack.file filename = attack.file
if attack.filetype == "png": if attack.filetype == "png":
self.original = wx.Image(filename,wx.BITMAP_TYPE_PNG) self.original = wx.Image(filename,wx.BITMAP_TYPE_PNG)
@ -46,6 +48,7 @@ class AttackDisplay(wx.ScrolledWindow):
print "Unknown file type %s." % (self.filetype) print "Unknown file type %s." % (self.filetype)
# TODO self.Bind(wxSizeEvent # TODO self.Bind(wxSizeEvent
self.Fit()
def OnSize(self,event): def OnSize(self,event):
self.update() self.update()
@ -196,10 +199,12 @@ class AttackWindow(wx.Frame):
self.Refresh() self.Refresh()
def OnZoom100(self,evt): def OnZoom100(self,evt):
self.Refresh()
self.fit = False self.fit = False
self.update() self.update()
def OnZoomFit(self,evt): def OnZoomFit(self,evt):
self.Refresh()
self.fit = True self.fit = True
self.update() self.update()

Binary file not shown.