Sketcher: Handling of ESC keypress during handler execution
=========================================================== Instead of terminating the handler, as mandated before this PR by ViewProviderSketch, ViewProviderSketch delegates the action to DrawSketchHandler. DrawSketchHandler implements by default this terminating behaviour, but allows to override it. DrawSketchDefaultHandler (and all tools deriving from it) implement as default behaviour to cancel if in initial state, otherwise to reset.
This commit is contained in:
committed by
abdullahtahiriyo
parent
fc472601e4
commit
9cb6fa0df7
@@ -690,8 +690,7 @@ bool ViewProviderSketch::keyPressed(bool pressed, int key)
|
||||
case SoKeyboardEvent::ESCAPE: {
|
||||
// make the handler quit but not the edit mode
|
||||
if (isInEditMode() && sketchHandler) {
|
||||
if (!pressed)
|
||||
sketchHandler->quit();
|
||||
sketchHandler->registerPressedKey(pressed, key); // delegate
|
||||
return true;
|
||||
}
|
||||
if (isInEditMode() && !drag.DragConstraintSet.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user