diff options
| author | bulia byak <buliabyak@gmail.com> | 2009-03-10 03:16:45 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2009-03-10 03:16:45 +0000 |
| commit | 2f08f0e28cab72ce97c89cc34492cc358b0d3f3d (patch) | |
| tree | ccfd347be39fc2def4f7bc7e072e2e25d5fdfd68 /src/shape-editor.cpp | |
| parent | Edit > Duplicate Layer should duplicate hidden items, locked items, sublayers... (diff) | |
| download | inkscape-2f08f0e28cab72ce97c89cc34492cc358b0d3f3d.tar.gz inkscape-2f08f0e28cab72ce97c89cc34492cc358b0d3f3d.zip | |
fix 317365: when moving in/out of defs, an object gets a new SPObject while keeping the same repr. this change does not fix all crashes that result from this, need more work on knotholder when it's editing clippaths or masks
(bzr r7465)
Diffstat (limited to 'src/shape-editor.cpp')
| -rw-r--r-- | src/shape-editor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index 1b81e1a83..b5fd85858 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -20,6 +20,7 @@ #include "live_effects/lpeobject.h" #include "selection.h" #include "desktop.h" +#include "document.h" #include "desktop-handles.h" #include "knotholder.h" #include "live_effects/parameter/point.h" @@ -316,23 +317,22 @@ void ShapeEditor::set_item_lpe_path_parameter(SPItem *item, SPObject *lpeobject, Why not make a reload function in NodePath and in KnotHolder? */ void ShapeEditor::reset_item (SubType type, bool keep_knotholder) { + SPObject *item = sp_desktop_document(desktop)->getObjectByRepr(listener_attached_for); + switch (type) { case SH_NODEPATH: if ( (this->nodepath) && (IS_LIVEPATHEFFECT(this->nodepath->object)) ) { - SPItem * item = this->nodepath->item; SPObject *obj = this->nodepath->object; char * key = g_strdup(this->nodepath->repr_key); - set_item_lpe_path_parameter(item, obj, key); // the above checks for nodepath, so it is indeed a path that we are editing + set_item_lpe_path_parameter(SP_ITEM(item), obj, key); // the above checks for nodepath, so it is indeed a path that we are editing g_free(key); } else { - SPItem * item = (SPItem *) get_item(SH_NODEPATH); - set_item(item, SH_NODEPATH); + set_item(SP_ITEM(item), SH_NODEPATH); } break; case SH_KNOTHOLDER: if (this->knotholder) { - SPItem * item = (SPItem *) get_item(SH_KNOTHOLDER); - set_item(item, SH_KNOTHOLDER, keep_knotholder); + set_item(SP_ITEM(item), SH_KNOTHOLDER, keep_knotholder); } break; } |
