Commit a868e571 authored by Christopher Keller's avatar Christopher Keller

Fixed bug that caused divide by zero error if main gviz window was sized too small.

parent 9f848c76
......@@ -218,6 +218,8 @@ class gviz(wx.Panel):
def resize(self, event):
size = self.GetClientSize()
size = [max(1.0, size[0]), max(1.0, size[1])]
self.size = [max(1.0, self.size[0]), max(1.0, self.size[1])]
newsize = min(float(size[0])/self.size[0], float(size[1])/self.size[1])
self.size = self.GetClientSize()
wx.CallAfter(self.zoom, 0, 0, newsize)
......
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