Index: data.c =================================================================== --- data.c (revision 16971) +++ data.c (revision 16972) @@ -581,7 +581,14 @@ } PCB_ENDALL_LOOP; ctx->inited = 1; } - pcb_gui->progress(ctx->at, ctx->total, "Clipping polygons..."); + if (pcb_gui->progress(ctx->at, ctx->total, "Clipping polygons...") != 0) { + if (pcb_gui->confirm_dialog("The only way to cancel poly clipping is to quit pcb-rnd.\nAre you sure you want to quit?", "yes, quit", "no, continue", NULL) != 0) { + /* Have to recreate the dialog next time, that's the only way to get it out from the cancel state */ + pcb_gui->progress(0, 0, NULL); + } + else + exit(1); + } } } }