[Bugfix]Sketcher: prevent dangling state of Shift key if key released out of Quarter
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user