Gui: fix -Wlogical-op-parentheses

This commit is contained in:
wmayer
2024-03-03 19:34:50 +01:00
committed by Chris Hennes
parent fbd8767242
commit 26ba1c3f9b
2 changed files with 10 additions and 4 deletions

View File

@@ -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; }

View File

@@ -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: