0001175: pressing escape in datum editing dialog closes sketch

This commit is contained in:
wmayer 2013-07-12 11:28:54 +02:00
parent c2a13abfaa
commit 93827f68e8

View File

@ -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"
}
}
}