diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 1d415ec10..79d9eb35d 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -129,6 +129,7 @@ SbVec2s ViewProviderSketch::newCursorPos; struct EditData { EditData(): sketchHandler(0), + editDatumDialog(false), DragPoint(-1), DragCurve(-1), DragConstraint(-1), @@ -150,6 +151,7 @@ struct EditData { // pointer to the active handler for new sketch objects DrawSketchHandler *sketchHandler; + bool editDatumDialog; // dragged point int DragPoint; @@ -289,6 +291,10 @@ bool ViewProviderSketch::keyPressed(bool pressed, int key) edit->sketchHandler->quit(); return true; } + if (edit && edit->editDatumDialog) { + edit->editDatumDialog = false; + return true; + } return false; } default: @@ -798,6 +804,7 @@ void ViewProviderSketch::editDoubleClicked(void) EditDatumDialog * editDatumDialog = new EditDatumDialog(this, edit->PreselectConstraint); SoIdleSensor* sensor = new SoIdleSensor(EditDatumDialog::run, editDatumDialog); sensor->schedule(); + edit->editDatumDialog = true; // avoid to double handle "ESC" } } }