Code

optimization: do not notify any listeners if attributes' new value is the same as old
[inkscape.git] / src / document.cpp
index f69c480f75e4a3f108cfdc9ce792283d166a3d4f..e5c0cd82495e1a91b5c925a315f157d124d9457c 100644 (file)
@@ -986,6 +986,9 @@ sp_document_remove_resource(SPDocument *document, gchar const *key, SPObject *ob
     g_return_val_if_fail(object != NULL, FALSE);
     g_return_val_if_fail(SP_IS_OBJECT(object), FALSE);
 
+    if (SP_OBJECT_IS_CLONED(object))
+        return FALSE;
+
     rlist = (GSList*)g_hash_table_lookup(document->priv->resources, key);
     g_return_val_if_fail(rlist != NULL, FALSE);
     g_return_val_if_fail(g_slist_find(rlist, object), FALSE);