aboutsummaryrefslogtreecommitdiff
path: root/src/sc_editor.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-01-29 22:10:53 +0100
committerThomas White <taw@physics.org>2018-01-29 22:10:53 +0100
commit6dedc1eb7742db4bcb06cb8459768a081f274903 (patch)
tree3e896cc885530fc47deb15d7bf601735affb1a8d /src/sc_editor.c
parent1dd2b61afed5f6f7d207ad9756e7b22108257205 (diff)
Fix incorrect handling when first frame is deleted
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r--src/sc_editor.c8
1 files changed, 6 insertions, 2 deletions
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);
}