summaryrefslogtreecommitdiffstats
path: root/src/sp-filter.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-05-09 18:34:01 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-05-09 18:34:01 +0000
commit36bc16fc9772ce0271eb5ec62e2c03cb1038282e (patch)
treec13d992c952bd21bc00c393d80bfe31c3b35284e /src/sp-filter.cpp
parentprevent overflow index on a pathinfo function (diff)
parentFix Doxyfile (diff)
downloadinkscape-36bc16fc9772ce0271eb5ec62e2c03cb1038282e.tar.gz
inkscape-36bc16fc9772ce0271eb5ec62e2c03cb1038282e.zip
update to trunk
(bzr r13645.1.85)
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);
}