From 14f56c4e1c2bfab2da63f01f4ea32dd80d6f3a55 Mon Sep 17 00:00:00 2001 From: Rexbas Date: Thu, 17 Nov 2022 16:41:49 +0100 Subject: [PATCH] Gui: Stop Revit rotation and zoom on scroll release - Stops the rotation when scroll is released but SHIFT is still pressed - Stops zooming when scroll is released but CTRL is still pressed --- src/Gui/RevitNavigationStyle.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Gui/RevitNavigationStyle.cpp b/src/Gui/RevitNavigationStyle.cpp index ef1518814a..62aeb2db8b 100644 --- a/src/Gui/RevitNavigationStyle.cpp +++ b/src/Gui/RevitNavigationStyle.cpp @@ -256,8 +256,6 @@ SbBool RevitNavigationStyle::processSoEvent(const SoEvent * const ev) newmode = NavigationStyle::SELECTION; break; case BUTTON1DOWN|BUTTON2DOWN: - newmode = NavigationStyle::PANNING; - break; case BUTTON3DOWN: newmode = NavigationStyle::PANNING; break; @@ -273,6 +271,13 @@ SbBool RevitNavigationStyle::processSoEvent(const SoEvent * const ev) break; default: + // Reset mode to SELECTION when button 3 is released + // This stops the DRAGGING when button 3 is released but SHIFT is still pressed + // This stops the ZOOMING when button 3 is released but CTRL is still pressed + if ((curmode == NavigationStyle::DRAGGING || curmode == NavigationStyle::ZOOMING) + && !this->button3down) { + newmode = NavigationStyle::SELECTION; + } break; }