From 4fdf3f76b0203a79b24febeafc2311b85bdcfa76 Mon Sep 17 00:00:00 2001 From: bulia byak Date: Wed, 12 Apr 2006 17:16:28 +0000 Subject: remove the old _d_changed and _typestr_changed hacks, replacing by an int-valued local_change flag; this works much faster with less code (bzr r495) --- src/node-context.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/node-context.cpp') diff --git a/src/node-context.cpp b/src/node-context.cpp index ccdb6c79e..1e01b1af9 100644 --- a/src/node-context.cpp +++ b/src/node-context.cpp @@ -310,7 +310,6 @@ nodepath_event_attr_changed(Inkscape::XML::Node *repr, gchar const *name, bool is_interactive, gpointer data) { SPItem *item = NULL; - char const *newd = NULL, *newtypestr = NULL; gboolean changed = FALSE; g_assert(data); @@ -322,21 +321,18 @@ nodepath_event_attr_changed(Inkscape::XML::Node *repr, gchar const *name, if (np) { item = SP_ITEM(np->path); - if (!strcmp(name, "d")) { - newd = new_value; - changed = nodepath_repr_d_changed(np, new_value); - } else if (!strcmp(name, "sodipodi:nodetypes")) { - newtypestr = new_value; - changed = nodepath_repr_typestr_changed(np, new_value); - } else { - return; - // With paths, we only need to act if one of the path-affecting attributes has changed. + if (!strcmp(name, "d") || !strcmp(name, "sodipodi:nodetypes")) { // With paths, we only need to act if one of the path-affecting attributes has changed. + changed = (np->local_change == 0); + if (np->local_change > 0) + np->local_change--; } + } else if (kh) { item = SP_ITEM(kh->item); changed = !(kh->local_change); kh->local_change = FALSE; } + if (np && changed) { GList *saved = NULL; SPDesktop *desktop = np->desktop; -- cgit v1.2.3