From 6d9539fb42c7f7806f98cfe0b767244abde95a6b Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 29 Nov 2012 14:35:42 +0100 Subject: [PATCH] 0000894: Invert mouse Zoom for CAD mouse model --- src/Gui/NavigationStyle.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index 85cada0b8..e801e1490 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -724,7 +724,10 @@ void NavigationStyle::zoomByCursor(const SbVec2f & thispos, const SbVec2f & prev { // There is no "geometrically correct" value, 20 just seems to give // about the right "feel". - zoom(viewer->getCamera(), (thispos[1] - prevpos[1]) * 10.0f/*20.0f*/); + float value = (thispos[1] - prevpos[1]) * 10.0f/*20.0f*/; + if (this->invertZoom) + value = -value; + zoom(viewer->getCamera(), value); } void NavigationStyle::zoomIn()