diff --git a/src/xinit.c b/src/xinit.c index b7eaa499..3f4f1294 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -586,6 +586,11 @@ void alloc_xschem_data(const char *top_path) xctx->undo_initialized = 0; /* in_memory_undo */ #endif xctx->time_last_modify = 0; + xctx->push_undo_ptr = &push_undo; + xctx->pop_undo_ptr = &pop_undo; + xctx->delete_undo_ptr = &delete_undo; + xctx->clear_undo_ptr = &clear_undo; + } void delete_schematic_data(void) diff --git a/src/xschem.h b/src/xschem.h index 958ec499..35f29311 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -713,6 +713,10 @@ typedef struct { int fill_pattern; int draw_window; time_t time_last_modify; + void (*push_undo_ptr)(void); + void (*pop_undo_ptr)(int, int); + void (*delete_undo_ptr)(void); + void (*clear_undo_ptr)(void); } Xschem_ctx; struct Lcc { /* used for symbols containing schematics as instances (LCC, Local Custom Cell) */