Gui/Sketcher: disable geometry deselection when user holds Ctrl or additionally Shift or Alt

This commit is contained in:
wmayer
2022-11-05 22:56:38 +01:00
parent fa21e3129f
commit 43d2fd2da9
2 changed files with 4 additions and 2 deletions

View File

@@ -1480,8 +1480,9 @@ SbBool NavigationStyle::processEvent(const SoEvent * const ev)
if ((curmode == NavigationStyle::SELECTION || curmode == NavigationStyle::IDLE)
&& !processed) {
if (SoMouseButtonEvent::isButtonReleaseEvent(ev, SoMouseButtonEvent::BUTTON1)) {
if (!(QApplication::keyboardModifiers() == Qt::ControlModifier))
if (!ev->wasCtrlDown()) {
Gui::Selection().clearSelection();
}
}
}

View File

@@ -891,8 +891,9 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe
Mode = STATUS_NONE;
return true;
case STATUS_SKETCH_StartRubberBand: // a single click happened, so clear selection unless user hold control.
if (!(QApplication::keyboardModifiers() == Qt::ControlModifier))
if (!(QApplication::keyboardModifiers() & Qt::ControlModifier)) {
Gui::Selection().clearSelection();
}
Mode = STATUS_NONE;
return true;
case STATUS_SKETCH_UseRubberBand: