From ec31dba6ea0b99c749d96d6389ab71622c233403 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 28 Feb 2012 18:22:40 +0100 Subject: [PATCH] 0000595: Turntable rotation inverted --- src/Gui/NavigationStyle.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index 34bec5184..8a44dd667 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -113,8 +113,14 @@ public: else { SbVec3f zaxis(0,0,1); this->worldToScreen.multDirMatrix(zaxis, zaxis); - if (dif[0] > 0) - angle = -angle; + if (zaxis[1] < 0) { + if (dif[0] < 0) + angle = -angle; + } + else { + if (dif[0] > 0) + angle = -angle; + } rot.setValue(zaxis, angle); } @@ -176,6 +182,8 @@ NavigationStyle& NavigationStyle::operator = (const NavigationStyle& ns) this->panningplane = ns.panningplane; this->menuenabled = ns.menuenabled; this->spinanimatingallowed = ns.spinanimatingallowed; + static_cast(this->spinprojector)->setOrbitStyle + (static_cast(ns.spinprojector)->getOrbitStyle()); return *this; }