Base: + Sketcher: disable deselection when user holds Ctrl.

This commit is contained in:
Paddle
2022-11-04 11:51:54 +01:00
committed by Chris Hennes
parent 7c3e5d3b34
commit eeddcfd2aa
2 changed files with 7 additions and 4 deletions

View File

@@ -1479,8 +1479,10 @@ SbBool NavigationStyle::processEvent(const SoEvent * const ev)
// check for left click without selecting something
if ((curmode == NavigationStyle::SELECTION || curmode == NavigationStyle::IDLE)
&& !processed) {
if (SoMouseButtonEvent::isButtonReleaseEvent(ev,SoMouseButtonEvent::BUTTON1))
Gui::Selection().clearSelection();
if (SoMouseButtonEvent::isButtonReleaseEvent(ev, SoMouseButtonEvent::BUTTON1)) {
if (!(QApplication::keyboardModifiers() == Qt::ControlModifier))
Gui::Selection().clearSelection();
}
}
return processed;

View File

@@ -889,9 +889,10 @@ 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
case STATUS_SKETCH_StartRubberBand: // a single click happened, so clear selection unless user hold control.
if (!(QApplication::keyboardModifiers() == Qt::ControlModifier))
Gui::Selection().clearSelection();
Mode = STATUS_NONE;
Gui::Selection().clearSelection();
return true;
case STATUS_SKETCH_UseRubberBand:
doBoxSelection(DoubleClick::prvCursorPos, cursorPos, viewer);