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
This commit is contained in:
Rexbas
2022-11-17 16:41:49 +01:00
committed by Uwe
parent 1559683684
commit 14f56c4e1c

View File

@@ -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;
}