Gui: Fix Blender and Revit navigation issues with shift key in sketcher
This commit is contained in:
committed by
Chris Hennes
parent
1212c55e38
commit
2942cfffbc
@@ -197,13 +197,11 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
const auto * const event = (const SoLocation2Event *) ev;
|
||||
if (this->currentmode == NavigationStyle::ZOOMING) {
|
||||
this->zoomByCursor(posn, prevnormalized);
|
||||
newmode = NavigationStyle::SELECTION;
|
||||
processed = true;
|
||||
}
|
||||
else if (this->currentmode == NavigationStyle::PANNING) {
|
||||
float ratio = vp.getViewportAspectRatio();
|
||||
panCamera(viewer->getSoRenderManager()->getCamera(), ratio, this->panningplane, posn, prevnormalized);
|
||||
newmode = NavigationStyle::SELECTION;
|
||||
processed = true;
|
||||
}
|
||||
else if (this->currentmode == NavigationStyle::DRAGGING) {
|
||||
@@ -277,6 +275,13 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
break;
|
||||
|
||||
default:
|
||||
// Reset mode to IDLE when button 3 is released
|
||||
// This stops the PANNING 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::PANNING || curmode == NavigationStyle::ZOOMING)
|
||||
&& !this->button3down) {
|
||||
newmode = NavigationStyle::IDLE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -272,12 +272,12 @@ SbBool RevitNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
break;
|
||||
|
||||
default:
|
||||
// Reset mode to SELECTION when button 3 is released
|
||||
// Reset mode to IDLE 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;
|
||||
newmode = NavigationStyle::IDLE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user