diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-10-23 20:25:01 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-10-23 20:25:01 +0000 |
| commit | 3a5c9da3ec750e36889cbe114d6b0d10d442f7ca (patch) | |
| tree | 2aeeeca0834642191fd9e02d9a054ee4afc3e393 /src/shape-editor.cpp | |
| parent | Revert undo LPE paths fix; crashed on linux :( (diff) | |
| download | inkscape-3a5c9da3ec750e36889cbe114d6b0d10d442f7ca.tar.gz inkscape-3a5c9da3ec750e36889cbe114d6b0d10d442f7ca.zip | |
fix undoing of LPE paths again. please test. (now nodepath is only updated when it is editting the changed xml attribute)
(bzr r3947)
Diffstat (limited to 'src/shape-editor.cpp')
| -rw-r--r-- | src/shape-editor.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index ed946d95f..55f3183e5 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -132,6 +132,13 @@ void ShapeEditor::restore_nodepath_selection (GList *saved) { ::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(); |
