Commit 6f7906eb authored by Guillaume Seguin's avatar Guillaume Seguin

Zoom to middle of screen when using keystrokes in gcview

parent 826c9ed7
......@@ -423,10 +423,11 @@ class GcodeViewPanel(wxGLPanel):
self.layerup()
if key in kdo:
self.layerdown()
x, y, _ = self.mouse_to_3d(self.width / 2, self.height / 2)
if key in kzi:
self.zoom(step)
self.zoom(step, (x, y))
if key in kzo:
self.zoom(1 / step)
self.zoom(1 / step, (x, y))
event.Skip()
wx.CallAfter(self.Refresh)
......
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