summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2013-10-01 13:25:44 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2013-10-01 13:25:44 +0000
commit87d93e27330577c2fd632dbaccbd3103884aa590 (patch)
tree2acaa8e8ab51a4dbaef40bd22bd780bdaceae0db /src
parentFix possible bug in DrawingItem code (diff)
downloadinkscape-87d93e27330577c2fd632dbaccbd3103884aa590.tar.gz
inkscape-87d93e27330577c2fd632dbaccbd3103884aa590.zip
Comprehensive fix for the issues with disappearing filtered objects.
Fixes #304407 and possibly a few other bugs. Revert incorrect _item_bbox changes from r12528. Fixed bugs: - https://launchpad.net/bugs/304407 (bzr r12648)
Diffstat (limited to 'src')
-rw-r--r--src/display/drawing-item.cpp25
-rw-r--r--src/display/drawing-item.h6
-rw-r--r--src/display/drawing-shape.cpp4
-rw-r--r--src/display/drawing-text.cpp4
-rw-r--r--src/display/nr-filter.cpp8
-rw-r--r--src/libnrtype/Layout-TNG-Output.cpp1
-rw-r--r--src/sp-flowdiv.cpp32
-rw-r--r--src/sp-flowregion.cpp16
-rw-r--r--src/sp-flowtext.cpp17
-rw-r--r--src/sp-item-group.cpp7
-rw-r--r--src/sp-item.cpp14
-rw-r--r--src/sp-text.cpp14
-rw-r--r--src/sp-tref.cpp14
-rw-r--r--src/sp-tspan.cpp12
-rw-r--r--src/sp-use.cpp29
15 files changed, 97 insertions, 106 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp
index b2b3e68a2..71a7f8906 100644
--- a/src/display/drawing-item.cpp
+++ b/src/display/drawing-item.cpp
@@ -290,17 +290,10 @@ DrawingItem::setZOrder(unsigned z)
_markForRendering();
}
-void DrawingItem::setItemBounds(Geom::OptRect const &bounds)
-{
- if (!bounds) return;
- Geom::IntRect copy = bounds->roundOutwards();
- if (_filter) _filter->area_enlarge(copy, this);
- this->setFilterBounds(copy);
-}
-
-void DrawingItem::setFilterBounds(Geom::OptRect const &bounds)
+void
+DrawingItem::setItemBounds(Geom::OptRect const &bounds)
{
- if (bounds) _filter_bbox = bounds;
+ _item_bbox = bounds;
}
/**
@@ -368,10 +361,14 @@ DrawingItem::update(Geom::IntRect const &area, UpdateContext const &ctx, unsigne
if (to_update & STATE_BBOX) {
// compute drawbox
- if (_filter && render_filters && _filter_bbox) {
- Geom::OptRect enlarged = _filter_bbox;
- *enlarged *= ctm();
- _drawbox = enlarged->roundOutwards();
+ if (_filter && render_filters) {
+ Geom::OptRect enlarged = _filter->filter_effect_area(_item_bbox);
+ if (enlarged) {
+ *enlarged *= ctm();
+ _drawbox = enlarged->roundOutwards();
+ } else {
+ _drawbox = Geom::OptIntRect();
+ }
} else {
_drawbox = _bbox;
}
diff --git a/src/display/drawing-item.h b/src/display/drawing-item.h
index c69b996b4..e03bbd0f7 100644
--- a/src/display/drawing-item.h
+++ b/src/display/drawing-item.h
@@ -89,7 +89,7 @@ public:
Geom::OptIntRect geometricBounds() const { return _bbox; }
Geom::OptIntRect visualBounds() const { return _drawbox; }
- Geom::OptRect filterBounds() const { return _filter_bbox; }
+ Geom::OptRect itemBounds() const { return _item_bbox; }
Geom::Affine ctm() const { return _ctm; }
Geom::Affine transform() const { return _transform ? *_transform : Geom::identity(); }
Drawing &drawing() const { return _drawing; }
@@ -176,7 +176,9 @@ protected:
Geom::Affine _ctm; ///< Total transform from item coords to display coords
Geom::OptIntRect _bbox; ///< Bounding box in display (pixel) coords including stroke
Geom::OptIntRect _drawbox; ///< Full visual bounding box - enlarged by filters, shrunk by clips and masks
- Geom::OptRect _filter_bbox; ///< Used by filters when settings bounds
+ Geom::OptRect _item_bbox; ///< Geometric bounding box in item's user space.
+ /// This is used to compute the filter effect region and render in
+ /// objectBoundingBox units.
DrawingItem *_clip;
DrawingItem *_mask;
diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp
index 9ad18243e..e80f12486 100644
--- a/src/display/drawing-shape.cpp
+++ b/src/display/drawing-shape.cpp
@@ -179,8 +179,8 @@ DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigne
// update fill and stroke paints.
// this cannot be done during nr_arena_shape_update, because we need a Cairo context
// to render svg:pattern
- has_fill = _nrstyle.prepareFill(ct, _filter_bbox);
- has_stroke = _nrstyle.prepareStroke(ct, _filter_bbox);
+ has_fill = _nrstyle.prepareFill(ct, _item_bbox);
+ has_stroke = _nrstyle.prepareStroke(ct, _item_bbox);
has_stroke &= (_nrstyle.stroke_width != 0);
if (has_fill || has_stroke) {
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp
index fa9ce4ff8..55d54b770 100644
--- a/src/display/drawing-text.cpp
+++ b/src/display/drawing-text.cpp
@@ -398,8 +398,8 @@ unsigned DrawingText::_renderItem(DrawingContext &ct, Geom::IntRect const &/*are
using Geom::X;
using Geom::Y;
- has_fill = _nrstyle.prepareFill( ct, _bbox);
- has_stroke = _nrstyle.prepareStroke(ct, _bbox);
+ has_fill = _nrstyle.prepareFill( ct, _item_bbox);
+ has_stroke = _nrstyle.prepareStroke(ct, _item_bbox);
if (has_fill || has_stroke) {
Geom::Affine rotinv;
diff --git a/src/display/nr-filter.cpp b/src/display/nr-filter.cpp
index 1289362aa..af9c15cd8 100644
--- a/src/display/nr-filter.cpp
+++ b/src/display/nr-filter.cpp
@@ -114,14 +114,12 @@ int Filter::render(Inkscape::DrawingItem const *item, DrawingContext &graphic, D
Geom::Affine trans = item->ctm();
- // Get filter area, the filter_effect_area is already done in visualBounds
- Geom::OptRect filter_area = item->filterBounds();
- // Use the geometricBounds as a backup solution
+ Geom::OptRect filter_area = filter_effect_area(item->itemBounds());
if (!filter_area) return 1;
FilterUnits units(_filter_units, _primitive_units);
units.set_ctm(trans);
- units.set_item_bbox(filter_area);
+ units.set_item_bbox(item->itemBounds());
units.set_filter_area(*filter_area);
std::pair<double,double> resolution
@@ -201,7 +199,7 @@ void Filter::area_enlarge(Geom::IntRect &bbox, Inkscape::DrawingItem const *item
}
Geom::Rect item_bbox;
- Geom::OptRect maybe_bbox = item->geometricBounds();
+ Geom::OptRect maybe_bbox = item->itemBounds();
if (maybe_bbox.isEmpty()) {
// Code below needs a bounding box
return;
diff --git a/src/libnrtype/Layout-TNG-Output.cpp b/src/libnrtype/Layout-TNG-Output.cpp
index 1989c495a..bdc786749 100644
--- a/src/libnrtype/Layout-TNG-Output.cpp
+++ b/src/libnrtype/Layout-TNG-Output.cpp
@@ -181,6 +181,7 @@ void Layout::show(DrawingGroup *in_arena, Geom::OptRect const &paintbox) const
glyph_index++;
}
nr_text->setStyle(text_source->style);
+ nr_text->setItemBounds(paintbox);
in_arena->prependChild(nr_text);
// Set item bounds without filter enlargement
in_arena->setItemBounds(paintbox);
diff --git a/src/sp-flowdiv.cpp b/src/sp-flowdiv.cpp
index 867e68441..00ba48b06 100644
--- a/src/sp-flowdiv.cpp
+++ b/src/sp-flowdiv.cpp
@@ -54,13 +54,11 @@ void SPFlowdiv::update(SPCtx *ctx, unsigned int flags) {
SPItemCtx *ictx = reinterpret_cast<SPItemCtx *>(ctx);
SPItemCtx cctx = *ictx;
- SPItem::update(ctx, flags);
-
+ unsigned childflags = flags;
if (flags & SP_OBJECT_MODIFIED_FLAG) {
- flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
+ childflags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
-
- flags &= SP_OBJECT_MODIFIED_CASCADE;
+ childflags &= SP_OBJECT_MODIFIED_CASCADE;
GSList* l = NULL;
for (SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
@@ -74,19 +72,21 @@ void SPFlowdiv::update(SPCtx *ctx, unsigned int flags) {
SPObject *child = SP_OBJECT(l->data);
l = g_slist_remove(l, child);
- if (flags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
+ if (childflags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
if (SP_IS_ITEM(child)) {
SPItem const &chi = *SP_ITEM(child);
cctx.i2doc = chi.transform * ictx->i2doc;
cctx.i2vp = chi.transform * ictx->i2vp;
- child->updateDisplay((SPCtx *)&cctx, flags);
+ child->updateDisplay((SPCtx *)&cctx, childflags);
} else {
- child->updateDisplay(ctx, flags);
+ child->updateDisplay(ctx, childflags);
}
}
sp_object_unref(child);
}
+
+ SPItem::update(ctx, flags);
}
void SPFlowdiv::modified(unsigned int flags) {
@@ -195,13 +195,11 @@ void SPFlowtspan::update(SPCtx *ctx, unsigned int flags) {
SPItemCtx *ictx = reinterpret_cast<SPItemCtx *>(ctx);
SPItemCtx cctx = *ictx;
- SPItem::update(ctx, flags);
-
+ unsigned childflags = flags;
if (flags & SP_OBJECT_MODIFIED_FLAG) {
- flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
+ childflags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
-
- flags &= SP_OBJECT_MODIFIED_CASCADE;
+ childflags &= SP_OBJECT_MODIFIED_CASCADE;
GSList* l = NULL;
for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
@@ -215,19 +213,21 @@ void SPFlowtspan::update(SPCtx *ctx, unsigned int flags) {
SPObject *child = SP_OBJECT(l->data);
l = g_slist_remove(l, child);
- if (flags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
+ if (childflags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
if (SP_IS_ITEM(child)) {
SPItem const &chi = *SP_ITEM(child);
cctx.i2doc = chi.transform * ictx->i2doc;
cctx.i2vp = chi.transform * ictx->i2vp;
- child->updateDisplay((SPCtx *)&cctx, flags);
+ child->updateDisplay((SPCtx *)&cctx, childflags);
} else {
- child->updateDisplay(ctx, flags);
+ child->updateDisplay(ctx, childflags);
}
}
sp_object_unref(child);
}
+
+ SPItem::update(ctx, flags);
}
void SPFlowtspan::modified(unsigned int flags) {
diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp
index ed17f1948..13ab7bc64 100644
--- a/src/sp-flowregion.cpp
+++ b/src/sp-flowregion.cpp
@@ -72,13 +72,11 @@ void SPFlowregion::update(SPCtx *ctx, unsigned int flags) {
SPItemCtx *ictx = reinterpret_cast<SPItemCtx *>(ctx);
SPItemCtx cctx = *ictx;
- SPItem::update(ctx, flags);
-
+ unsigned childflags = flags;
if (flags & SP_OBJECT_MODIFIED_FLAG) {
- flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
+ childflags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
-
- flags &= SP_OBJECT_MODIFIED_CASCADE;
+ childflags &= SP_OBJECT_MODIFIED_CASCADE;
GSList *l = NULL;
@@ -93,20 +91,22 @@ void SPFlowregion::update(SPCtx *ctx, unsigned int flags) {
SPObject *child = SP_OBJECT(l->data);
l = g_slist_remove(l, child);
- if (flags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
+ if (childflags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
if (SP_IS_ITEM (child)) {
SPItem const &chi = *SP_ITEM(child);
cctx.i2doc = chi.transform * ictx->i2doc;
cctx.i2vp = chi.transform * ictx->i2vp;
- child->updateDisplay((SPCtx *)&cctx, flags);
+ child->updateDisplay((SPCtx *)&cctx, childflags);
} else {
- child->updateDisplay(ctx, flags);
+ child->updateDisplay(ctx, childflags);
}
}
sp_object_unref(child);
}
+ SPItem::update(ctx, flags);
+
this->UpdateComputed();
}
diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp
index 266e9dfe0..49360f9d9 100644
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
@@ -72,10 +72,11 @@ void SPFlowtext::update(SPCtx* ctx, unsigned int flags) {
SPItemCtx *ictx = (SPItemCtx *) ctx;
SPItemCtx cctx = *ictx;
- SPItem::update(ctx, flags);
-
- if (flags & SP_OBJECT_MODIFIED_FLAG) flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
- flags &= SP_OBJECT_MODIFIED_CASCADE;
+ unsigned childflags = flags;
+ if (flags & SP_OBJECT_MODIFIED_FLAG) {
+ childflags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
+ }
+ childflags &= SP_OBJECT_MODIFIED_CASCADE;
GSList *l = NULL;
@@ -90,20 +91,22 @@ void SPFlowtext::update(SPCtx* ctx, unsigned int flags) {
SPObject *child = SP_OBJECT(l->data);
l = g_slist_remove(l, child);
- if (flags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
+ if (childflags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
if (SP_IS_ITEM(child)) {
SPItem const &chi = *SP_ITEM(child);
cctx.i2doc = chi.transform * ictx->i2doc;
cctx.i2vp = chi.transform * ictx->i2vp;
- child->updateDisplay((SPCtx *)&cctx, flags);
+ child->updateDisplay((SPCtx *)&cctx, childflags);
} else {
- child->updateDisplay(ctx, flags);
+ child->updateDisplay(ctx, childflags);
}
}
sp_object_unref(child);
}
+ SPItem::update(ctx, flags);
+
this->rebuildLayout();
Geom::OptRect pbox = this->geometricBounds();
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index 284d3317a..41e049b86 100644
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
@@ -217,13 +217,6 @@ void SPGroup::modified(guint flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
- if (flags & SP_OBJECT_STYLE_MODIFIED_FLAG) {
- for (SPItemView *v = this->display; v != NULL; v = v->next) {
- Inkscape::DrawingGroup *group = dynamic_cast<Inkscape::DrawingGroup *>(v->arenaitem);
- group->setStyle(this->style);
- }
- }
-
GSList *l = g_slist_reverse(this->childList(true));
while (l) {
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index c342bfd9b..5bf0afdeb 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -603,13 +603,13 @@ void SPItem::update(SPCtx *ctx, guint flags) {
}
}
}
- /* Update bounding box data used by filters */
+ /* Update bounding box in user space, used for filter and objectBoundingBox units */
if (item->style->filter.set && item->display) {
- Geom::OptRect item_bbox = item->visualBounds();
+ Geom::OptRect item_bbox = item->geometricBounds();
SPItemView *itemview = item->display;
do {
- if (itemview->arenaitem) // Already enlarged by visualBounds
- itemview->arenaitem->setFilterBounds(item_bbox);
+ if (itemview->arenaitem)
+ itemview->arenaitem->setItemBounds(item_bbox);
} while ( (itemview = itemview->next) );
}
@@ -1065,12 +1065,8 @@ Inkscape::DrawingItem *SPItem::invoke_show(Inkscape::Drawing &drawing, unsigned
SP_MASK(mask)->sp_mask_set_bbox(mask_key, item_bbox);
mask->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
- if (style->filter.set && display) {
- item_bbox = visualBounds();
- }
ai->setData(this);
- // Already enlarged by visualBounds for filters
- ai->setFilterBounds(item_bbox);
+ ai->setItemBounds(geometricBounds());
}
return ai;
diff --git a/src/sp-text.cpp b/src/sp-text.cpp
index c515828a4..c431f52da 100644
--- a/src/sp-text.cpp
+++ b/src/sp-text.cpp
@@ -135,12 +135,9 @@ void SPText::remove_child(Inkscape::XML::Node *rch) {
void SPText::update(SPCtx *ctx, guint flags) {
- SPItem::update(ctx, flags);
-
- guint cflags = (flags & SP_OBJECT_MODIFIED_CASCADE);
-
+ unsigned childflags = (flags & SP_OBJECT_MODIFIED_CASCADE);
if (flags & SP_OBJECT_MODIFIED_FLAG) {
- cflags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
+ childflags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
// Create temporary list of children
@@ -157,14 +154,17 @@ void SPText::update(SPCtx *ctx, guint flags) {
SPObject *child = reinterpret_cast<SPObject*>(l->data); // We just built this list, so cast is safe.
l = g_slist_remove (l, child);
- if (cflags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
+ if (childflags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
/* fixme: Do we need transform? */
- child->updateDisplay(ctx, cflags);
+ child->updateDisplay(ctx, childflags);
}
sp_object_unref(child, this);
}
+ // update ourselves after updating children
+ SPItem::update(ctx, flags);
+
if (flags & ( SP_OBJECT_STYLE_MODIFIED_FLAG |
SP_OBJECT_CHILD_MODIFIED_FLAG |
SP_TEXT_LAYOUT_MODIFIED_FLAG ) )
diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp
index 4f9947a04..1c0481547 100644
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
@@ -148,21 +148,21 @@ void SPTRef::set(unsigned int key, const gchar* value) {
void SPTRef::update(SPCtx *ctx, guint flags) {
debug("0x%p",this);
- SPItem::update(ctx, flags);
-
+ unsigned childflags = flags;
if (flags & SP_OBJECT_MODIFIED_FLAG) {
- flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
+ childflags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
-
- flags &= SP_OBJECT_MODIFIED_CASCADE;
+ childflags &= SP_OBJECT_MODIFIED_CASCADE;
SPObject *child = this->stringChild;
if (child) {
- if ( flags || ( child->uflags & SP_OBJECT_MODIFIED_FLAG )) {
- child->updateDisplay(ctx, flags);
+ if ( childflags || ( child->uflags & SP_OBJECT_MODIFIED_FLAG )) {
+ child->updateDisplay(ctx, childflags);
}
}
+
+ SPItem::update(ctx, flags);
}
void SPTRef::modified(unsigned int flags) {
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index 21c5ee11f..20d404130 100644
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
@@ -107,19 +107,19 @@ void SPTSpan::set(unsigned int key, const gchar* value) {
}
void SPTSpan::update(SPCtx *ctx, guint flags) {
- SPItem::update(ctx, flags);
-
+ unsigned childflags = flags;
if (flags & SP_OBJECT_MODIFIED_FLAG) {
- flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
+ childflags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
-
- flags &= SP_OBJECT_MODIFIED_CASCADE;
+ childflags &= SP_OBJECT_MODIFIED_CASCADE;
for ( SPObject *ochild = this->firstChild() ; ochild ; ochild = ochild->getNext() ) {
if ( flags || ( ochild->uflags & SP_OBJECT_MODIFIED_FLAG )) {
- ochild->updateDisplay(ctx, flags);
+ ochild->updateDisplay(ctx, childflags);
}
}
+
+ SPItem::update(ctx, flags);
}
void SPTSpan::modified(unsigned int flags) {
diff --git a/src/sp-use.cpp b/src/sp-use.cpp
index a558c6bf4..ec367d786 100644
--- a/src/sp-use.cpp
+++ b/src/sp-use.cpp
@@ -476,20 +476,12 @@ void SPUse::update(SPCtx *ctx, unsigned flags) {
SPItemCtx *ictx = (SPItemCtx *) ctx;
SPItemCtx cctx = *ictx;
- SPItem::update(ctx, flags);
-
+ unsigned childflags = flags;
if (flags & SP_OBJECT_MODIFIED_FLAG) {
- flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
+ childflags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
- flags &= SP_OBJECT_MODIFIED_CASCADE;
-
- if (flags & SP_OBJECT_STYLE_MODIFIED_FLAG) {
- for (SPItemView *v = this->display; v != NULL; v = v->next) {
- Inkscape::DrawingGroup *g = dynamic_cast<Inkscape::DrawingGroup *>(v->arenaitem);
- g->setStyle(this->style);
- }
- }
+ childflags &= SP_OBJECT_MODIFIED_CASCADE;
/* Set up child viewport */
if (this->x.unit == SVGLength::PERCENT) {
@@ -510,21 +502,30 @@ void SPUse::update(SPCtx *ctx, unsigned flags) {
cctx.viewport = Geom::Rect::from_xywh(0, 0, this->width.computed, this->height.computed);
cctx.i2vp = Geom::identity();
- flags&=~SP_OBJECT_USER_MODIFIED_FLAG_B;
+ childflags &= ~SP_OBJECT_USER_MODIFIED_FLAG_B;
if (this->child) {
sp_object_ref(this->child);
- if (flags || (this->child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
+ if (childflags || (this->child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
SPItem const &chi = *SP_ITEM(this->child);
cctx.i2doc = chi.transform * ictx->i2doc;
cctx.i2vp = chi.transform * ictx->i2vp;
- this->child->updateDisplay((SPCtx *)&cctx, flags);
+ this->child->updateDisplay((SPCtx *)&cctx, childflags);
}
sp_object_unref(this->child);
}
+ SPItem::update(ctx, flags);
+
+ if (flags & SP_OBJECT_STYLE_MODIFIED_FLAG) {
+ for (SPItemView *v = this->display; v != NULL; v = v->next) {
+ Inkscape::DrawingGroup *g = dynamic_cast<Inkscape::DrawingGroup *>(v->arenaitem);
+ g->setStyle(this->style);
+ }
+ }
+
/* As last step set additional transform of arena group */
for (SPItemView *v = this->display; v != NULL; v = v->next) {
Inkscape::DrawingGroup *g = dynamic_cast<Inkscape::DrawingGroup *>(v->arenaitem);