summaryrefslogtreecommitdiffstats
path: root/src/sp-filter.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2015-05-08 17:26:29 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2015-05-08 17:26:29 +0000
commitf31b2c75e1313ccceeb6d33cc14aa545d4d370f9 (patch)
tree444b38fe397f34ee5c298ed0efd5cc9f49afb7cf /src/sp-filter.cpp
parentMore helper/geom.h pruning. (diff)
parentcmake: Bring cmake installation in line with autotools (bug #1451481) (diff)
downloadinkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.tar.gz
inkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.zip
Merge from trunk
(bzr r14059.2.11)
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);
}