summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-02-13 01:54:33 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-02-13 01:54:33 +0000
commit0f6e70628b0899caadcedcc45660176a3ea5d065 (patch)
treeaab153dbc743c70da44e7ccd3d42004446b34053 /src
parentdo not try to remove resource if the object is cloned (diff)
downloadinkscape-0f6e70628b0899caadcedcc45660176a3ea5d065.tar.gz
inkscape-0f6e70628b0899caadcedcc45660176a3ea5d065.zip
optimization: do not notify any listeners if attributes' new value is the same as old
(bzr r121)
Diffstat (limited to 'src')
-rw-r--r--src/xml/simple-node.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp
index fa626a3f2..d83e5d54b 100644
--- a/src/xml/simple-node.cpp
+++ b/src/xml/simple-node.cpp
@@ -429,7 +429,7 @@ SimpleNode::setAttribute(gchar const *name, gchar const *value, bool const is_in
}
}
- if ( new_value != old_value ) {
+ if ( new_value != old_value && (!old_value || !new_value || strcmp(old_value, new_value))) {
if (_logger) {
_logger->notifyAttributeChanged(*this, key, old_value, new_value);
}