Skip to content

Commit

Permalink
Gui: GestureNav: fix constant hand cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepSOIC committed May 5, 2017
1 parent 297b20e commit 2d61415
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Gui/GestureNavigationStyle.cpp
Expand Up @@ -389,12 +389,16 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev)
}
if(! processed) {
//re-synthesize all previously-consumed mouseDowns, if any. They might have been re-synthesized already when threshold was broken.
if (button == SoMouseButtonEvent::BUTTON1)
setViewingMode(NavigationStyle::SELECTION);
for( int i=0; i < this->mousedownConsumedCount; i++ ){
inherited::processSoEvent(& (this->mousedownConsumedEvent[i]));//simulate the previously-comsumed mousedown.
}
this->mousedownConsumedCount = 0;
processed = inherited::processSoEvent(ev);//explicitly, just for clarity that we are sending a full click sequence.
propagated = true;
if (!(this->button1down || this->button2down || this->button3down))
setViewingMode(NavigationStyle::IDLE);
}
}
break;
Expand Down Expand Up @@ -489,7 +493,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev)
processed = true;
} else { //all buttons are released
//end of dragging/panning/whatever
setViewingMode(NavigationStyle::SELECTION);
setViewingMode(NavigationStyle::IDLE);
processed = true;
} //else of if (some bottons down)
break;
Expand Down Expand Up @@ -529,7 +533,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev)
const SoGestureEvent* gesture = static_cast<const SoGestureEvent*>(ev);
assert(gesture);
if (gesture->state == SoGestureEvent::SbGSEnd) {
setViewingMode(NavigationStyle::SELECTION);
setViewingMode(NavigationStyle::IDLE);
processed=true;
} else if (gesture->state == SoGestureEvent::SbGSUpdate){
if(type.isDerivedFrom(SoGesturePinchEvent::getClassTypeId())){
Expand Down Expand Up @@ -577,7 +581,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev)
//animation modes
if (!processed) {
if (evIsButton || evIsGesture || evIsKeyboard || evIsLoc3)
setViewingMode(NavigationStyle::SELECTION);
setViewingMode(NavigationStyle::IDLE);
}
} break; //end of animation modes
case NavigationStyle::BOXZOOM:
Expand Down

0 comments on commit 2d61415

Please sign in to comment.