From 5af8924e1de466080dc116b47edd7c8d8591652b Mon Sep 17 00:00:00 2001 From: Raphael Rosch Date: Tue, 5 May 2015 13:26:20 -0400 Subject: show filter usage count Fixed bugs: - https://launchpad.net/bugs/1169123 (bzr r14111) --- src/sp-filter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/sp-filter.cpp') diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp index 2bf1b11a6..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. */ -- cgit v1.2.3