Merge pull request #1 from hurzl/patch-3

zoom big preview by shift + key
master
hurzl 2012-03-05 01:59:51 -08:00
commit 5c22914f2b
1 changed files with 12 additions and 4 deletions

16
gviz.py
View File

@ -47,13 +47,21 @@ class window(wx.Frame):
else:
event.Skip()
def key(self, event):
x=event.GetKeyCode()
if event.ShiftDown():
cx,cy=self.p.translate
if x==wx.WXK_UP:
self.p.zoom(cx,cy,1.2)
if x==wx.WXK_DOWN:
self.p.zoom(cx,cy,1/1.2)
else:
if x==wx.WXK_UP:
self.p.layerup()
if x==wx.WXK_DOWN:
self.p.layerdown()
#print x
if x==wx.WXK_UP:
self.p.layerup()
if x==wx.WXK_DOWN:
self.p.layerdown()
#print p.lines.keys()
def zoom(self, event):