From af7eb5322812b47a32ac3c246812fdc870163b6c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 10 Aug 2011 23:00:53 +0200 Subject: Update after stylesheet change --- src/objects.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/objects.c') diff --git a/src/objects.c b/src/objects.c index 6b99005..a97b769 100644 --- a/src/objects.c +++ b/src/objects.c @@ -31,6 +31,7 @@ #include "presentation.h" #include "objects.h" +#include "mainwindow.h" static struct object *new_object(enum objtype t, struct layout_element *le) @@ -227,6 +228,34 @@ void position_caret(struct object *o, double x, double y) } +void notify_style_update(struct presentation *p, struct text_style *ts) +{ + int i; + int changed = 0; + + for ( i=0; inum_slides; i++ ) { + + int j; + struct slide *s; + + s = p->slides[i]; + + for ( j=0; jslides[i]->num_objects; j++ ) { + + if ( s->objects[j]->type != TEXT ) continue; + + s->object_seq++; + if ( p->view_slide == s ) changed = 1; + break; + + } + + } + + if ( changed ) notify_slide_changed(p); +} + + void delete_object(struct object *o) { remove_object_from_slide(o->parent, o); -- cgit v1.2.3