Skip to content

Commit

Permalink
Gui: Fix rotation mode for MayaGesture style
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexbas committed Jun 4, 2024
1 parent 0001879 commit 0b8ac9e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Gui/MayaGestureNavigationStyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)

// start DRAGGING mode (orbit)
// if not pressing left mouse button then it assumes is right mouse button and starts ZOOMING mode
setRotationCenter(getFocalPoint());
saveCursorPosition(ev);
setViewingMode(this->button1down ? NavigationStyle::DRAGGING : NavigationStyle::ZOOMING);
processed = true;
} else {
Expand Down Expand Up @@ -477,7 +477,7 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
processed = true;
} else if (type.isDerivedFrom(SoGesturePinchEvent::getClassTypeId())) {
setupPanningPlane(viewer->getSoRenderManager()->getCamera());//set up panning plane
setRotationCenter(getFocalPoint());
saveCursorPosition(ev);
setViewingMode(NavigationStyle::DRAGGING);
processed = true;
} //all other gestures - ignore!
Expand All @@ -504,7 +504,12 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
case SoMouseButtonEvent::BUTTON3: // allows to release button3 into SELECTION mode
if(comboAfter & BUTTON1DOWN || comboAfter & BUTTON2DOWN) {
//don't leave navigation till all buttons have been released
setRotationCenter(getFocalPoint());
if (comboAfter & BUTTON1DOWN && comboAfter & BUTTON2DOWN) {
setRotationCenter(getFocalPoint());
}
else {
saveCursorPosition(ev);
}
setViewingMode((comboAfter & BUTTON1DOWN) ? NavigationStyle::DRAGGING : NavigationStyle::PANNING);
processed = true;
} else { //all buttons are released
Expand Down

0 comments on commit 0b8ac9e

Please sign in to comment.