Index: undo.c =================================================================== --- undo.c (revision 20454) +++ undo.c (revision 20455) @@ -52,6 +52,7 @@ #include "data.h" #include "draw.h" #include "error.h" +#include "event.h" #include "insert.h" #include "polygon.h" #include "remove.h" @@ -119,6 +120,8 @@ else if (pcb_undo_and_draw) pcb_draw(); + pcb_event(PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_UNDO); + return res; } @@ -161,6 +164,8 @@ else if (pcb_undo_and_draw) pcb_draw(); + pcb_event(PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_REDO); + return res; } @@ -210,8 +215,10 @@ */ void pcb_undo_clear_list(pcb_bool Force) { - if (pcb_uundo.num_undo && (Force || pcb_gui->confirm_dialog("OK to clear 'undo' buffer?", 0))) + if (pcb_uundo.num_undo && (Force || pcb_gui->confirm_dialog("OK to clear 'undo' buffer?", 0))) { uundo_list_clear(&pcb_uundo); + pcb_event(PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_CLEAR_LIST); + } } /* --------------------------------------------------------------------------- @@ -247,6 +254,7 @@ void pcb_undo_truncate_from(uundo_serial_t sfirst) { uundo_list_truncate_from(&pcb_uundo, sfirst); + pcb_event(PCB_EVENT_UNDO_POST, "i", PCB_UNDO_EV_TRUNCATE); } int undo_check(void)