chiark
/
gitweb
/
~ianmdlvl
/
cura.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1d897e
)
Limited the amount of zooming during scrolling to a more sane value.
author
Erik de Bruijn
<github@erikdebruijn.nl>
Tue, 16 Apr 2013 15:08:30 +0000
(17:08 +0200)
committer
Erik de Bruijn
<github@erikdebruijn.nl>
Tue, 16 Apr 2013 15:08:30 +0000
(17:08 +0200)
Cura/gui/sceneView.py
patch
|
blob
|
history
diff --git
a/Cura/gui/sceneView.py
b/Cura/gui/sceneView.py
index 1bf2c81044c31c220fbf19816a90bfbfdb102322..f12b43b18356869186fce3a99da829e6b6a394f4 100644
(file)
--- a/
Cura/gui/sceneView.py
+++ b/
Cura/gui/sceneView.py
@@
-457,7
+457,9
@@
class SceneView(openglGui.glGuiPanel):
self._mouseY = e.GetY()
def OnMouseWheel(self, e):
- self._zoom *= 1.0 - float(e.GetWheelRotation() / e.GetWheelDelta()) / 10.0
+ delta = float(e.GetWheelRotation()) / float(e.GetWheelDelta())
+ delta = max(min(delta,4),-4)
+ self._zoom *= 1.0 - delta / 10.0
if self._zoom < 1.0:
self._zoom = 1.0
if self._zoom > numpy.max(self._machineSize) * 3: