summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6218828)
raw | patch | inline | side by side (parent: 6218828)
author | kiirala <kiirala@users.sourceforge.net> | |
Sun, 17 May 2009 00:10:29 +0000 (00:10 +0000) | ||
committer | kiirala <kiirala@users.sourceforge.net> | |
Sun, 17 May 2009 00:10:29 +0000 (00:10 +0000) |
src/display/nr-arena-image.cpp | patch | blob | history | |
src/sp-image.cpp | patch | blob | history |
index 52f6278e4a924813efbce0de839da42e7f3eb1ce..f45a2da4f8c8c44e2a05b7733731aadf6e5303aa 100644 (file)
&& style->enable_background.value == SP_CSS_BACKGROUND_NEW) {
image->background_new = true;
}
+
+ nr_arena_item_request_update(image, NR_ARENA_ITEM_STATE_ALL, FALSE);
}
diff --git a/src/sp-image.cpp b/src/sp-image.cpp
index c99e1e0f79ffdbfc3ccccbba4d80de3b5f45bef9..65aad1e2d097a30f0e20df76275becc1ce5386c0 100644 (file)
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
static void sp_image_release (SPObject * object);
static void sp_image_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_image_update (SPObject *object, SPCtx *ctx, unsigned int flags);
+static void sp_image_modified (SPObject *object, unsigned int flags);
static Inkscape::XML::Node *sp_image_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_image_bbox(SPItem const *item, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags);
sp_object_class->release = sp_image_release;
sp_object_class->set = sp_image_set;
sp_object_class->update = sp_image_update;
+ sp_object_class->modified = sp_image_modified;
sp_object_class->write = sp_image_write;
item_class->bbox = sp_image_bbox;
sp_image_update_canvas_image ((SPImage *) object);
}
+static void
+sp_image_modified (SPObject *object, unsigned int flags)
+{
+ SPImage *image = SP_IMAGE (object);
+
+ if (((SPObjectClass *) (parent_class))->modified) {
+ (* ((SPObjectClass *) (parent_class))->modified) (object, flags);
+ }
+
+ if (flags & SP_OBJECT_STYLE_MODIFIED_FLAG) {
+ for (SPItemView *v = SP_ITEM (image)->display; v != NULL; v = v->next) {
+ nr_arena_image_set_style (NR_ARENA_IMAGE (v->arenaitem), object->style);
+ }
+ }
+}
+
static Inkscape::XML::Node *
sp_image_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
{