From cec7f1f7b8abc32eaff06e9116af2a38ba67f9bd Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 28 Apr 2016 22:01:15 +0200 Subject: Fix slide number the first time the slide window is opened --- src/sc_editor.c | 4 ++-- src/slide_window.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sc_editor.c b/src/sc_editor.c index 941c822..1d1e381 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -143,8 +143,8 @@ static gboolean resize_sig(GtkWidget *widget, GdkEventConfigure *event, h = e->log_h; } e->top = interp_and_shape(e->scblocks, e->stylesheets, e->cbl, - e->is, ISZ_EDITOR, 0, cr, w, h, - e->lang); + e->is, ISZ_EDITOR, e->slidenum, cr, + w, h, e->lang); recursive_wrap(e->top, pc); } diff --git a/src/slide_window.c b/src/slide_window.c index a627ff1..c55fd8d 100644 --- a/src/slide_window.c +++ b/src/slide_window.c @@ -628,6 +628,7 @@ SlideWindow *slide_window_open(struct presentation *p, SCBlock *scblocks) ch = sc_block_append_inside(scblocks, NULL, NULL, ""); } sw->sceditor = sc_editor_new(ch, stylesheets, p->lang); + sc_editor_set_slidenum(sw->sceditor, slide_number(sw->p, scblocks)); scroll = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), -- cgit v1.2.3