add undo function pointers

This commit is contained in:
Stefan Frederik 2021-11-28 13:29:13 +01:00
parent 01b3401e43
commit 88b00fd546
2 changed files with 9 additions and 0 deletions

View File

@ -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)

View File

@ -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) */