diff --git a/src/Gui/BlenderNavigationStyle.cpp b/src/Gui/BlenderNavigationStyle.cpp index b7b6fc1759..c933d30dfb 100644 --- a/src/Gui/BlenderNavigationStyle.cpp +++ b/src/Gui/BlenderNavigationStyle.cpp @@ -136,10 +136,6 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) this->seekToPoint(pos); // implicitly calls interactiveCountInc() processed = true; } - //else if (press && (this->currentmode == NavigationStyle::IDLE)) { - // this->setViewing(true); - // processed = true; - //} else if (press && (this->currentmode == NavigationStyle::PANNING || this->currentmode == NavigationStyle::ZOOMING)) { newmode = NavigationStyle::DRAGGING; @@ -285,11 +281,6 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) this->lockButton1 = false; processed = true; } - - //if (curmode == NavigationStyle::DRAGGING) { - // if (doSpin()) - // newmode = NavigationStyle::SPINNING; - //} break; case BUTTON1DOWN: case CTRLDOWN|BUTTON1DOWN: @@ -311,9 +302,6 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) } newmode = NavigationStyle::DRAGGING; break; - //case BUTTON1DOWN|BUTTON2DOWN|BUTTON3DOWN: - // newmode = NavigationStyle::ZOOMING; - // break; case CTRLDOWN|SHIFTDOWN|BUTTON2DOWN: case CTRLDOWN|BUTTON3DOWN: newmode = NavigationStyle::ZOOMING; @@ -335,10 +323,8 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) // If not handled in this class, pass on upwards in the inheritance // hierarchy. - if (/*(curmode == NavigationStyle::SELECTION || viewer->isEditing()) && */!processed) + if (!processed) processed = inherited::processSoEvent(ev); - else - return true; return processed; } diff --git a/src/Gui/CADNavigationStyle.cpp b/src/Gui/CADNavigationStyle.cpp index 17a590933e..a390e0ff3d 100644 --- a/src/Gui/CADNavigationStyle.cpp +++ b/src/Gui/CADNavigationStyle.cpp @@ -135,39 +135,11 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) case SoMouseButtonEvent::BUTTON1: this->lockrecenter = true; this->button1down = press; -#if 0 // disable to avoid interferences where this key combination is used, too - if (press && ev->wasShiftDown() && - (this->currentmode != NavigationStyle::SELECTION)) { - this->centerTime = ev->getTime(); - float ratio = vp.getViewportAspectRatio(); - SbViewVolume vv = viewer->getCamera()->getViewVolume(ratio); - this->panningplane = vv.getPlane(viewer->getCamera()->focalDistance.getValue()); - this->lockrecenter = false; - } - else if (!press && ev->wasShiftDown() && - (this->currentmode != NavigationStyle::SELECTION)) { - SbTime tmp = (ev->getTime() - this->centerTime); - float dci = (float)QApplication::doubleClickInterval()/1000.0f; - // is it just a left click? - if (tmp.getValue() < dci && !this->lockrecenter) { - if (!this->moveToPoint(pos)) { - panToCenter(panningplane, posn); - this->interactiveCountDec(); - } - processed = true; - } - } - else -#endif if (press && (this->currentmode == NavigationStyle::SEEK_WAIT_MODE)) { newmode = NavigationStyle::SEEK_MODE; this->seekToPoint(pos); // implicitly calls interactiveCountInc() processed = true; } - //else if (press && (this->currentmode == NavigationStyle::IDLE)) { - // this->setViewing(true); - // processed = true; - //} else if (press && (this->currentmode == NavigationStyle::PANNING || this->currentmode == NavigationStyle::ZOOMING)) { newmode = NavigationStyle::DRAGGING; @@ -327,11 +299,6 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) this->lockButton1 = false; processed = true; } - - //if (curmode == NavigationStyle::DRAGGING) { - // if (doSpin()) - // newmode = NavigationStyle::SPINNING; - //} break; case BUTTON1DOWN: // make sure not to change the selection when stopping spinning @@ -364,16 +331,6 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) case CTRLDOWN|SHIFTDOWN|BUTTON2DOWN: newmode = NavigationStyle::ZOOMING; break; - //case CTRLDOWN: - //case CTRLDOWN|BUTTON1DOWN: - //case CTRLDOWN|SHIFTDOWN: - //case CTRLDOWN|SHIFTDOWN|BUTTON1DOWN: - // newmode = NavigationStyle::SELECTION; - // break; - //case BUTTON1DOWN|BUTTON3DOWN: - //case CTRLDOWN|BUTTON3DOWN: - // newmode = NavigationStyle::ZOOMING; - // break; // There are many cases we don't handle that just falls through to // the default case, like SHIFTDOWN, CTRLDOWN, CTRLDOWN|SHIFTDOWN, @@ -385,10 +342,6 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) default: // The default will make a spin stop and otherwise not do // anything. - //if ((curmode != NavigationStyle::SEEK_WAIT_MODE) && - // (curmode != NavigationStyle::SEEK_MODE)) { - // newmode = NavigationStyle::IDLE; - //} break; } @@ -404,10 +357,8 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) // If not handled in this class, pass on upwards in the inheritance // hierarchy. - if (/*(curmode == NavigationStyle::SELECTION || viewer->isEditing()) && */!processed) + if (!processed) processed = inherited::processSoEvent(ev); - else - return true; return processed; } diff --git a/src/Gui/OpenCascadeNavigationStyle.cpp b/src/Gui/OpenCascadeNavigationStyle.cpp index 62abcebb9f..6b42b53003 100644 --- a/src/Gui/OpenCascadeNavigationStyle.cpp +++ b/src/Gui/OpenCascadeNavigationStyle.cpp @@ -303,10 +303,8 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) // If not handled in this class, pass on upwards in the inheritance // hierarchy. - if (/*(curmode == NavigationStyle::SELECTION || viewer->isEditing()) && */!processed) + if (!processed) processed = inherited::processSoEvent(ev); - else - return true; return processed; } diff --git a/src/Gui/RevitNavigationStyle.cpp b/src/Gui/RevitNavigationStyle.cpp index 8510dec8f2..0c22aeeffd 100644 --- a/src/Gui/RevitNavigationStyle.cpp +++ b/src/Gui/RevitNavigationStyle.cpp @@ -136,10 +136,6 @@ SbBool RevitNavigationStyle::processSoEvent(const SoEvent * const ev) this->seekToPoint(pos); // implicitly calls interactiveCountInc() processed = true; } - //else if (press && (this->currentmode == NavigationStyle::IDLE)) { - // this->setViewing(true); - // processed = true; - //} else if (press && (this->currentmode == NavigationStyle::PANNING || this->currentmode == NavigationStyle::ZOOMING)) { newmode = NavigationStyle::DRAGGING; @@ -283,11 +279,6 @@ SbBool RevitNavigationStyle::processSoEvent(const SoEvent * const ev) this->lockButton1 = false; processed = true; } - - //if (curmode == NavigationStyle::DRAGGING) { - // if (doSpin()) - // newmode = NavigationStyle::SPINNING; - //} break; case BUTTON1DOWN: case CTRLDOWN|BUTTON1DOWN: @@ -309,9 +300,6 @@ SbBool RevitNavigationStyle::processSoEvent(const SoEvent * const ev) } newmode = NavigationStyle::DRAGGING; break; - //case BUTTON1DOWN|BUTTON2DOWN|BUTTON3DOWN: - // newmode = NavigationStyle::ZOOMING; - // break; case CTRLDOWN|SHIFTDOWN|BUTTON2DOWN: case CTRLDOWN|BUTTON3DOWN: newmode = NavigationStyle::ZOOMING; @@ -333,10 +321,7 @@ SbBool RevitNavigationStyle::processSoEvent(const SoEvent * const ev) // If not handled in this class, pass on upwards in the inheritance // hierarchy. - if (/*(curmode == NavigationStyle::SELECTION || viewer->isEditing()) && */!processed) + if (!processed) processed = inherited::processSoEvent(ev); - else - return true; - return processed; } diff --git a/src/Gui/TouchpadNavigationStyle.cpp b/src/Gui/TouchpadNavigationStyle.cpp index 50d4d69672..b6fd4b3df4 100644 --- a/src/Gui/TouchpadNavigationStyle.cpp +++ b/src/Gui/TouchpadNavigationStyle.cpp @@ -299,8 +299,5 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) // hierarchy. if (!processed) processed = inherited::processSoEvent(ev); - else - return true; - return processed; }