From 3e43c57c9571cfd07cfc582f4129fbec99e15c12 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Fri, 28 Mar 2008 19:48:22 +0000 Subject: fix lpe-PathPAram when deleting the path that it links to fix ClipboardManager to construct the svgd from pathvector instead of obtaining the string from PathParam which can be a href instead of svgd (bzr r5222) --- src/live_effects/parameter/path.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/live_effects/parameter/path.cpp') diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index be26006c7..d7237e54b 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -205,6 +205,7 @@ PathParam::param_editOncanvas(SPItem * item, SPDesktop * dt) shape_editor->set_item_lpe_path_parameter(item, SP_OBJECT(param_effect->getLPEObj()), param_key.c_str()); } else { // set referred item for editing + shape_editor->set_item(ref.getObject()); } } @@ -241,6 +242,18 @@ PathParam::param_set_and_write_new_value (Geom::Piecewise must_recalculate_pwd2 = false; } +void +PathParam::param_set_and_write_new_value (std::vector const & newpath) +{ + remove_link(); + _pathvector = newpath; + must_recalculate_pwd2 = true; + + gchar * svgd = SVGD_from_2GeomPath( _pathvector ); + param_write_to_repr(svgd); + g_free(svgd); +} + void PathParam::ensure_pwd2() { @@ -294,8 +307,9 @@ PathParam::remove_link() void PathParam::linked_delete(SPObject */*deleted*/) { -// don't know what to do yet. not acting probably crashes inkscape. - g_message("PathParam::linked_delete"); + quit_listening(); + remove_link(); + param_set_and_write_new_value (_pathvector); } void -- cgit v1.2.3