Commit b76da408 authored by 0penBrain's avatar 0penBrain Committed by Chris Hennes
Browse files

[Bugfix]Sketcher: prevent dangling state of Shift key if key released out of Quarter

parent 1059dd4f
......@@ -511,12 +511,6 @@ bool ViewProviderSketch::keyPressed(bool pressed, int key)
return false;
}
break;
case SoKeyboardEvent::LEFT_SHIFT:
if (Mode < STATUS_SKETCH_UseHandler) {
editCoinManager->setConstraintSelectability(!pressed);
return true;
}
[[fallthrough]];
default:
{
if (isInEditMode() && sketchHandler)
......@@ -1081,6 +1075,16 @@ bool ViewProviderSketch::mouseMove(const SbVec2s &cursorPos, Gui::View3DInventor
// maximum radius for mouse moves when selecting a geometry before switching to drag mode
const int dragIgnoredDistance = 3;
static bool selectableConstraints = true;
if (Mode < STATUS_SKETCH_UseHandler) {
bool tmpSelCons = QApplication::keyboardModifiers() & Qt::ShiftModifier;
if (tmpSelCons != !selectableConstraints) {
selectableConstraints = !tmpSelCons;
editCoinManager->setConstraintSelectability(selectableConstraints);
}
}
if (!isInEditMode())
return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment