Index: trunk/src/brave.c =================================================================== --- trunk/src/brave.c (revision 22886) +++ trunk/src/brave.c (revision 22887) @@ -51,6 +51,7 @@ static desc_t desc[] = { {PCB_BRAVE_NOXOR, "noxor", "avoid xor drawing", "use alternative rendering instead of xor draw", 0}, + {PCB_BRAVE_CLIPBATCH, "clipbatch", "batch poly clipping", "batch polygon clipping in some expensive user operations", 0}, {0, NULL, NULL, NULL} }; Index: trunk/src/brave.h =================================================================== --- trunk/src/brave.h (revision 22886) +++ trunk/src/brave.h (revision 22887) @@ -3,6 +3,7 @@ typedef enum { /* bitfield */ PCB_BRAVE_OFF = 0, PCB_BRAVE_NOXOR = 1, + PCB_BRAVE_CLIPBATCH = 2, PCB_BRACE_max } pcb_brave_t; Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 22886) +++ trunk/src/obj_subc.c (revision 22887) @@ -31,6 +31,7 @@ #include "buffer.h" #include "board.h" #include "crosshair.h" +#include "brave.h" #include "data.h" #include "error.h" #include "obj_subc.h" @@ -947,6 +948,9 @@ { int n; + if ((pcb_brave & PCB_BRAVE_CLIPBATCH) && (Data != NULL)) + pcb_data_clip_inhibit_inc(Data); + switch(batch_undo) { case PCB_SUBCOP_UNDO_SUBC: pcb_undo_freeze_serial(); @@ -1046,6 +1050,9 @@ case PCB_SUBCOP_UNDO_NORMAL: break; } + if ((pcb_brave & PCB_BRAVE_CLIPBATCH) && (Data != NULL)) + pcb_data_clip_inhibit_dec(Data, 0); + return sc; } Index: trunk/src/operation.c =================================================================== --- trunk/src/operation.c (revision 22886) +++ trunk/src/operation.c (revision 22887) @@ -34,6 +34,7 @@ #include "conf_core.h" #include "undo.h" #include "rats.h" +#include "brave.h" /* ---------------------------------------------------------------------- * performs several operations on the passed object @@ -104,6 +105,9 @@ { pcb_bool changed = pcb_false; + if ((pcb_brave & PCB_BRAVE_CLIPBATCH) && (data != NULL)) + pcb_data_clip_inhibit_inc(data); + /* check lines */ if (type & PCB_OBJ_LINE && F->Line) { PCB_LINE_VISIBLE_LOOP(data); @@ -236,5 +240,8 @@ if (Reset && changed) pcb_undo_inc_serial(); + if ((pcb_brave & PCB_BRAVE_CLIPBATCH) && (data != NULL)) + pcb_data_clip_inhibit_dec(data, 0); + return changed; }