summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f52a04)
raw | patch | inline | side by side (parent: 2f52a04)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 23 Oct 2007 20:25:01 +0000 (20:25 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 23 Oct 2007 20:25:01 +0000 (20:25 +0000) |
src/shape-editor.cpp | patch | blob | history | |
src/shape-editor.h | patch | blob | history |
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index ed946d95f32cd92c4827616e5f526cc66cff3493..55f3183e53dc027b8a0a25a7478a83f0e168c252 100644 (file)
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
::restore_nodepath_selection (this->nodepath, saved);
}
+bool ShapeEditor::nodepath_edits_repr_key(gchar const *name) {
+ if (nodepath && name) {
+ return ( !strcmp(name, nodepath->repr_key) || !strcmp(name, nodepath->repr_nodetypes_key) );
+ }
+
+ return false;
+}
static void shapeeditor_event_attr_changed(Inkscape::XML::Node *repr, gchar const *name,
gchar const *old_value, gchar const *new_value,
@@ -142,9 +149,7 @@ static void shapeeditor_event_attr_changed(Inkscape::XML::Node *repr, gchar cons
g_assert(data);
ShapeEditor *sh = ((ShapeEditor *) data);
- if ( ((sh->has_nodepath())
- && (!strcmp(name, "d") || !strcmp(name, "sodipodi:nodetypes"))) // With paths, we only need to act if one of the path-affecting attributes has changed.
- || sh->has_knotholder())
+ if ( sh->has_knotholder() || ( sh->has_nodepath() && sh->nodepath_edits_repr_key(name) ) )
{
changed = !sh->has_local_change();
sh->decrement_local_change();
diff --git a/src/shape-editor.h b/src/shape-editor.h
index 8f4895be636cb95fca45a7ad08845ed1bd202389..c4271568f975b78b51e24b8a0c26218bf054d4ee 100644 (file)
--- a/src/shape-editor.h
+++ b/src/shape-editor.h
void distribute (NR::Dim2 axis);
void align (NR::Dim2 axis);
+ bool nodepath_edits_repr_key(gchar const *name);
+
private:
SPDesktop *desktop;