Delete the partially drawn entity when ESC is pressed on pending operations by using UndoUndo()

pull/1343/merge
phkahler 2023-07-26 18:08:02 -04:00 committed by Paul Kahler
parent f0912d42b1
commit b34d9a2f11
1 changed files with 10 additions and 0 deletions

View File

@ -1102,6 +1102,16 @@ void GraphicsWindow::MenuEdit(Command id) {
}
}
}
// some pending operations need an Undo to properly clean up on ESC
if ( (SS.GW.pending.operation == Pending::DRAGGING_NEW_POINT)
|| (SS.GW.pending.operation == Pending::DRAGGING_NEW_LINE_POINT)
|| (SS.GW.pending.operation == Pending::DRAGGING_NEW_ARC_POINT)
|| (SS.GW.pending.operation == Pending::DRAGGING_NEW_CUBIC_POINT)
|| (SS.GW.pending.operation == Pending::DRAGGING_NEW_RADIUS) )
{
SS.GW.ClearSuper();
SS.UndoUndo();
}
SS.GW.ClearSuper();
SS.TW.HideEditControl();
SS.nakedEdges.Clear();