Commit 46c2805d authored by Guillaume Seguin's avatar Guillaume Seguin

Add keybinding (R key) to reset 3D view

parent 032dbc57
......@@ -445,7 +445,8 @@ class GcodeViewPanel(wxGLPanel):
kdo = [68, 317] # Down Keys
kzi = [wx.WXK_PAGEDOWN, 388, 316, 61] # Zoom In Keys
kzo = [wx.WXK_PAGEUP, 390, 314, 45] # Zoom Out Keys
kfit = [70] # Zoom Out Keys
kfit = [70] # Fit to print keys
kreset = [82] # Reset keys
key = event.GetKeyCode()
if key in kup:
self.layerup()
......@@ -458,6 +459,9 @@ class GcodeViewPanel(wxGLPanel):
self.zoom(1 / step, (x, y))
if key in kfit:
self.fit()
if key in kreset:
self.reset_mview(0.9)
self.basequat = [0, 0, 0, 1]
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