Commit 3813ea29 authored by Keegi's avatar Keegi

fixed drawing grid for non-square beds

parent eaa2a4c0
......@@ -131,9 +131,9 @@ class gviz(wx.Panel):
for grid_unit in self.grid:
if grid_unit > 0:
for x in xrange(int(self.bedsize[0]/grid_unit)+1):
dc.DrawLine(self.translate[0]+x*self.scale[0]*grid_unit,self.translate[1],self.translate[0]+x*self.scale[0]*grid_unit,self.translate[1]+self.scale[1]*max(self.bedsize))
dc.DrawLine(self.translate[0]+x*self.scale[0]*grid_unit,self.translate[1],self.translate[0]+x*self.scale[0]*grid_unit,self.translate[1]+self.scale[1]*self.bedsize[1])
for y in xrange(int(self.bedsize[1]/grid_unit)+1):
dc.DrawLine(self.translate[0],self.translate[1]+y*self.scale[1]*grid_unit,self.translate[0]+self.scale[0]*max(self.bedsize),self.translate[1]+y*self.scale[1]*grid_unit)
dc.DrawLine(self.translate[0],self.translate[1]+y*self.scale[1]*grid_unit,self.translate[0]+self.scale[0]*self.bedsize[0],self.translate[1]+y*self.scale[1]*grid_unit)
dc.SetPen(wx.Pen(wx.Colour(0,0,0)))
if not self.showall:
self.size = self.GetSize()
......
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