From: buliabyak Date: Mon, 13 Feb 2006 01:54:33 +0000 (+0000) Subject: optimization: do not notify any listeners if attributes' new value is the same as old X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=509fc4654e5dfcfd7fa98460228cd32114a8cc8a;p=inkscape.git optimization: do not notify any listeners if attributes' new value is the same as old --- 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); }