+ fixes #0001479: 'Escape' key dismissing dialog cancels Sketch editing
This commit is contained in:
parent
498032f958
commit
ca6d372025
|
@ -132,6 +132,7 @@ struct EditData {
|
||||||
EditData():
|
EditData():
|
||||||
sketchHandler(0),
|
sketchHandler(0),
|
||||||
editDatumDialog(false),
|
editDatumDialog(false),
|
||||||
|
buttonPress(false),
|
||||||
DragPoint(-1),
|
DragPoint(-1),
|
||||||
DragCurve(-1),
|
DragCurve(-1),
|
||||||
DragConstraint(-1),
|
DragConstraint(-1),
|
||||||
|
@ -154,6 +155,7 @@ struct EditData {
|
||||||
// pointer to the active handler for new sketch objects
|
// pointer to the active handler for new sketch objects
|
||||||
DrawSketchHandler *sketchHandler;
|
DrawSketchHandler *sketchHandler;
|
||||||
bool editDatumDialog;
|
bool editDatumDialog;
|
||||||
|
bool buttonPress;
|
||||||
|
|
||||||
// dragged point
|
// dragged point
|
||||||
int DragPoint;
|
int DragPoint;
|
||||||
|
@ -358,6 +360,14 @@ bool ViewProviderSketch::keyPressed(bool pressed, int key)
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (edit) {
|
||||||
|
// #0001479: 'Escape' key dismissing dialog cancels Sketch editing
|
||||||
|
// If we receive a button release event but not a press event before
|
||||||
|
// then ignore this one.
|
||||||
|
if (!pressed && !edit->buttonPress)
|
||||||
|
return true;
|
||||||
|
edit->buttonPress = pressed;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user