diff --git a/src/Gui/CADNavigationStyle.cpp b/src/Gui/CADNavigationStyle.cpp index b5464695e4..931eafaf5a 100644 --- a/src/Gui/CADNavigationStyle.cpp +++ b/src/Gui/CADNavigationStyle.cpp @@ -260,10 +260,13 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) break; case BUTTON1DOWN: // make sure not to change the selection when stopping spinning - if (curmode == NavigationStyle::SPINNING || this->lockButton1 && curmode != NavigationStyle::SELECTION) + if (curmode == NavigationStyle::SPINNING + || (this->lockButton1 && curmode != NavigationStyle::SELECTION)) { newmode = NavigationStyle::IDLE; - else + } + else { newmode = NavigationStyle::SELECTION; + } break; case BUTTON3DOWN: if (curmode == NavigationStyle::SPINNING) { break; } diff --git a/src/Gui/RevitNavigationStyle.cpp b/src/Gui/RevitNavigationStyle.cpp index 5925936b58..be45712689 100644 --- a/src/Gui/RevitNavigationStyle.cpp +++ b/src/Gui/RevitNavigationStyle.cpp @@ -253,10 +253,13 @@ SbBool RevitNavigationStyle::processSoEvent(const SoEvent * const ev) case BUTTON1DOWN: case CTRLDOWN|BUTTON1DOWN: // make sure not to change the selection when stopping spinning - if (curmode == NavigationStyle::SPINNING || this->lockButton1 && curmode != NavigationStyle::SELECTION) + if (curmode == NavigationStyle::SPINNING + || (this->lockButton1 && curmode != NavigationStyle::SELECTION)) { newmode = NavigationStyle::IDLE; - else + } + else { newmode = NavigationStyle::SELECTION; + } break; case BUTTON1DOWN|BUTTON2DOWN: case BUTTON3DOWN: