summaryrefslogtreecommitdiffstats
path: root/src/node-context.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-04-12 17:16:28 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-04-12 17:16:28 +0000
commit4fdf3f76b0203a79b24febeafc2311b85bdcfa76 (patch)
tree416226ddec29976768f8e18326f5cd23202bde74 /src/node-context.cpp
parentadd some includes (diff)
downloadinkscape-4fdf3f76b0203a79b24febeafc2311b85bdcfa76.tar.gz
inkscape-4fdf3f76b0203a79b24febeafc2311b85bdcfa76.zip
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)
Diffstat (limited to 'src/node-context.cpp')
-rw-r--r--src/node-context.cpp16
1 files changed, 6 insertions, 10 deletions
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;