Gui: Prevent rubber-band selection when selection button is pressed after other buttons are pressed

This commit is contained in:
Rexbas
2024-01-22 21:34:08 +01:00
parent a01818a0c5
commit eac036105e
8 changed files with 50 additions and 18 deletions

View File

@@ -269,6 +269,7 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev)
}
break;
case BUTTON1DOWN:
if (curmode == NavigationStyle::SELECTION) { break; }
if (newmode != NavigationStyle::DRAGGING) {
saveCursorPosition(ev);
}
@@ -295,6 +296,11 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev)
break;
}
// Process when selection button is pressed together with other buttons that could trigger different actions.
if (this->button1down && (this->button2down || this->button3down)) {
processed = true;
}
if (newmode != curmode) {
this->setViewingMode(newmode);
}