summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 19c5fda)
raw | patch | inline | side by side (parent: 19c5fda)
author | Jon A. Cruz <jon@joncruz.org> | |
Fri, 2 Jul 2010 07:40:46 +0000 (00:40 -0700) | ||
committer | Jon A. Cruz <jon@joncruz.org> | |
Fri, 2 Jul 2010 07:40:46 +0000 (00:40 -0700) |
src/sp-object.cpp | patch | blob | history |
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 420c7b4a6ca2a545aaf5d12f56bf94c828c01954..3b0056b41c9cdf7a6431dd3fca1b98d34923cf9d 100644 (file)
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
/** Queues the object for orphan collection */
-void
-SPObject::requestOrphanCollection() {
+void SPObject::requestOrphanCollection() {
g_return_if_fail(document != NULL);
// do not remove style or script elements (Bug #276244)
- if (SP_IS_STYLE_ELEM(this))
- return;
- if (SP_IS_SCRIPT(this))
- return;
-
- document->queueForOrphanCollection(this);
+ if (SP_IS_STYLE_ELEM(this)) {
+ // leave it
+ } else if (SP_IS_SCRIPT(this)) {
+ // leave it
+ } else if (SP_IS_PAINT_SERVER(this) && static_cast<SPPaintServer*>(this)->isSwatch() ) {
+ // leave it
+ } else {
+ document->queueForOrphanCollection(this);
- /** \todo
- * This is a temporary hack added to make fill&stroke rebuild its
- * gradient list when the defs are vacuumed. gradient-vector.cpp
- * listens to the modified signal on defs, and now we give it that
- * signal. Mental says that this should be made automatic by
- * merging SPObjectGroup with SPObject; SPObjectGroup would issue
- * this signal automatically. Or maybe just derive SPDefs from
- * SPObjectGroup?
- */
+ /** \todo
+ * This is a temporary hack added to make fill&stroke rebuild its
+ * gradient list when the defs are vacuumed. gradient-vector.cpp
+ * listens to the modified signal on defs, and now we give it that
+ * signal. Mental says that this should be made automatic by
+ * merging SPObjectGroup with SPObject; SPObjectGroup would issue
+ * this signal automatically. Or maybe just derive SPDefs from
+ * SPObjectGroup?
+ */
- this->requestModified(SP_OBJECT_CHILD_MODIFIED_FLAG);
+ this->requestModified(SP_OBJECT_CHILD_MODIFIED_FLAG);
+ }
}
/** Sends the delete signal to all children of this object recursively */