Gui: [skip ci] add method NavigationStyle::syncModifierKeys() to reduce code duplication

This commit is contained in:
wmayer
2021-11-02 14:52:22 +01:00
parent 9def811a3a
commit 1c93d3ee15
11 changed files with 26 additions and 69 deletions

View File

@@ -111,15 +111,7 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev)
// Mismatches in state of the modifier keys happens if the user
// presses or releases them outside the viewer window.
if (this->ctrldown != ev->wasCtrlDown()) {
this->ctrldown = ev->wasCtrlDown();
}
if (this->shiftdown != ev->wasShiftDown()) {
this->shiftdown = ev->wasShiftDown();
}
if (this->altdown != ev->wasAltDown()) {
this->altdown = ev->wasAltDown();
}
syncModifierKeys(ev);
// give the nodes in the foreground root the chance to handle events (e.g color bar)
if (!viewer->isEditing()) {