summaryrefslogtreecommitdiffstats
path: root/src/sp-filter.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-07-24 19:53:33 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-07-24 19:53:33 +0000
commit5a37f06c70e0e4e2519812564f4dcdced7c0246a (patch)
treef959f73813cb6f968072aee1100323b24e294136 /src/sp-filter.cpp
parentupdate to trunk (diff)
parentFix a bug continuing a bezier path whith a LPE one like spiro or bspline on a... (diff)
downloadinkscape-5a37f06c70e0e4e2519812564f4dcdced7c0246a.tar.gz
inkscape-5a37f06c70e0e4e2519812564f4dcdced7c0246a.zip
update to trunk
(bzr r13879.1.17)
Diffstat (limited to 'src/sp-filter.cpp')
-rw-r--r--src/sp-filter.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp
index a70fbd5bb..1bde69dd1 100644
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
@@ -79,6 +79,7 @@ void SPFilter::build(SPDocument *document, Inkscape::XML::Node *repr) {
this->readAttr( "height" );
this->readAttr( "filterRes" );
this->readAttr( "xlink:href" );
+ this->_refcount = 0;
SPObject::build(document, repr);
@@ -190,6 +191,15 @@ void SPFilter::set(unsigned int key, gchar const *value) {
}
}
+
+/**
+ * Returns the number of references to the filter.
+ */
+guint SPFilter::getRefCount() {
+ // NOTE: this is currently updated by sp_style_filter_ref_changed() in style.cpp
+ return _refcount;
+}
+
/**
* Receives update notifications.
*/
@@ -235,11 +245,9 @@ void SPFilter::update(SPCtx *ctx, guint flags) {
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);
+ std::vector<SPObject*> l(this->childList(true, SPObject::ActionUpdate));
+ for(std::vector<SPObject*>::const_iterator i=l.begin();i!=l.end();i++){
+ SPObject *child = *i;
if( SP_IS_FILTER_PRIMITIVE( child ) ) {
child->updateDisplay(ctx, childflags);
}