From 6dedc1eb7742db4bcb06cb8459768a081f274903 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 29 Jan 2018 22:10:53 +0100 Subject: Fix incorrect handling when first frame is deleted --- src/sc_editor.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/sc_editor.c') diff --git a/src/sc_editor.c b/src/sc_editor.c index e7b3cd1..08ddb46 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -203,7 +203,8 @@ static gboolean resize_sig(GtkWidget *widget, GdkEventConfigure *event, w = e->log_w; h = e->log_h; } - e->top = interp_and_shape(e->scblocks, e->stylesheets, e->cbl, + e->top = interp_and_shape(sc_block_child(e->scblocks), + e->stylesheets, e->cbl, e->is, e->slidenum, pc, w, h, e->lang); recursive_wrap(e->top, pc); @@ -402,7 +403,8 @@ static void full_rerender(SCEditor *e) pc = gdk_pango_context_get(); - e->top = interp_and_shape(e->scblocks, e->stylesheets, e->cbl, + e->top = interp_and_shape(sc_block_child(e->scblocks), + e->stylesheets, e->cbl, e->is, e->slidenum, pc, e->log_w, 0.0, e->lang); @@ -484,7 +486,9 @@ void sc_editor_copy_selected_frame(SCEditor *e) void sc_editor_delete_selected_frame(SCEditor *e) { + SCBlock *scb_old = e->scblocks; sc_block_delete(&e->scblocks, e->selection->scblocks); + assert(scb_old == e->scblocks); full_rerender(e); emit_change_sig(e); } -- cgit v1.2.3