Commit 5a430c56 authored by Guillaume Seguin's avatar Guillaume Seguin

Improve gviz resizing behavior

parent 7dceaa06
......@@ -219,11 +219,10 @@ class gviz(wx.Panel):
float(self.size[1] - 1)/self.build_dimensions[1])]
def resize(self, event):
oldside = max(1.0, min(self.size))
old_basescale = self.basescale
self.size = self.GetClientSizeTuple()
self.update_basescale()
newside = max(1.0, min(self.size))
zoomratio = float(newside) / oldside
zoomratio = float(self.basescale[0]) / old_basescale[0]
wx.CallLater(200, self.zoom, 0, 0, zoomratio)
def zoom(self, x, y, factor):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment