aboutsummaryrefslogtreecommitdiff
path: root/src/objects.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-08-10 23:00:53 +0200
committerThomas White <taw@bitwiz.org.uk>2011-08-10 23:00:53 +0200
commitaf7eb5322812b47a32ac3c246812fdc870163b6c (patch)
treea86f8953a37f50cf41228b1080f0231cd82c0655 /src/objects.c
parent87d1c1c339768b8c9cde14e40b955e618ee4540f (diff)
Update after stylesheet change
Diffstat (limited to 'src/objects.c')
-rw-r--r--src/objects.c29
1 files changed, 29 insertions, 0 deletions
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; i<p->num_slides; i++ ) {
+
+ int j;
+ struct slide *s;
+
+ s = p->slides[i];
+
+ for ( j=0; j<p->slides[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);