summaryrefslogtreecommitdiffstats
path: root/src/sp-filter.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-03-01 15:28:39 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-03-01 15:28:39 +0000
commitefabd8330ec1bfda05e46c5315debc43e6dbca34 (patch)
treeee0a4d3a0898beca0aa9345c71fb5c5c9a55d9a8 /src/sp-filter.cpp
parentSubstitute isBSpline property by a cached function isBSpline(bool) (diff)
parentupdate po/POTFILES.in (add new INX file from r13080) (diff)
downloadinkscape-efabd8330ec1bfda05e46c5315debc43e6dbca34.tar.gz
inkscape-efabd8330ec1bfda05e46c5315debc43e6dbca34.zip
update to trunk
(bzr r11950.1.262)
Diffstat (limited to 'src/sp-filter.cpp')
-rw-r--r--src/sp-filter.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp
index 0e3d2d5ce..e8319baca 100644
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
@@ -213,7 +213,6 @@ void SPFilter::update(SPCtx *ctx, guint flags) {
// Note: This only works for root viewport since this routine is not called after
// setting a new viewport. A true fix requires a strategy like SPItemView or SPMarkerView.
if(this->filterUnits == SP_FILTER_UNITS_USERSPACEONUSE) {
- std::cout << " userSpaceOnUse" << std::endl;
if (this->x.unit == SVGLength::PERCENT) {
this->x._set = true;
this->x.computed = this->x.value * ictx->viewport.width();
@@ -238,6 +237,25 @@ void SPFilter::update(SPCtx *ctx, guint flags) {
}
+ // Update filter primitives in order to update filter primitive area
+ // (SPObject::ActionUpdate is not actually used)
+ unsigned childflags = flags;
+
+ if (flags & SP_OBJECT_MODIFIED_FLAG) {
+ childflags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
+ }
+ childflags &= SP_OBJECT_MODIFIED_CASCADE;
+
+ GSList *l = g_slist_reverse(this->childList(true, SPObject::ActionUpdate));
+ while (l) {
+ SPObject *child = SP_OBJECT (l->data);
+ l = g_slist_remove (l, child);
+ if( SP_IS_FILTER_PRIMITIVE( child ) ) {
+ child->updateDisplay(ctx, childflags);
+ }
+ sp_object_unref(child);
+ }
+
SPObject::update(ctx, flags);
}