diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/loadsave.c | 2 | ||||
-rw-r--r-- | src/notes.c | 6 | ||||
-rw-r--r-- | src/notes.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/loadsave.c b/src/loadsave.c index a4c2891..0ce38d8 100644 --- a/src/loadsave.c +++ b/src/loadsave.c @@ -759,6 +759,8 @@ int save_presentation(struct presentation *p, const char *filename) struct serializer ser; char *old_fn; + grab_current_notes(p); + fh = fopen(filename, "w"); if ( fh == NULL ) return 1; diff --git a/src/notes.c b/src/notes.c index 90e3987..b213a1f 100644 --- a/src/notes.c +++ b/src/notes.c @@ -75,6 +75,12 @@ static void grab_notes(struct notes *n, struct slide *s) } +void grab_current_notes(struct presentation *p) +{ + grab_notes(p->notes, p->cur_notes_slide); +} + + void notify_notes_slide_changed(struct presentation *p, struct slide *np) { grab_notes(p->notes, p->cur_notes_slide); diff --git a/src/notes.h b/src/notes.h index f6fba5c..82d1355 100644 --- a/src/notes.h +++ b/src/notes.h @@ -37,4 +37,5 @@ extern void notify_notes_slide_changed(struct presentation *p, extern void write_notes(struct slide *s, struct serializer *ser); extern void load_notes(struct ds_node *node, struct slide *s); +extern void grab_current_notes(struct presentation *p); #endif /* NOTES_H */ |