From 1f0a20e9f4270de3aff4b9ce0484e1d26c6d58da Mon Sep 17 00:00:00 2001 From: Jabiertxo Arraiza Cenoz Date: Fri, 8 Sep 2017 22:28:13 +0200 Subject: Fix for bug: 1715433 :: Clone original LPE can no longer be used to fill a powerstroke path --- src/live_effects/parameter/path.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (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 ec011b855..470535314 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -68,6 +68,7 @@ PathParam::PathParam( const Glib::ustring& label, const Glib::ustring& tip, defvalue = g_strdup(default_value); param_readSVGValue(defvalue); oncanvas_editable = true; + _from_original_d = false; _edit_button = true; _copy_button = true; _paste_button = true; @@ -444,7 +445,11 @@ PathParam::linked_modified_callback(SPObject *linked_obj, guint /*flags*/) { SPCurve *curve = NULL; if (SP_IS_SHAPE(linked_obj)) { - curve = SP_SHAPE(linked_obj)->getCurve(); + if (_from_original_d) { + curve = SP_SHAPE(linked_obj)->getCurveBeforeLPE(); + } else { + curve = SP_SHAPE(linked_obj)->getCurve(); + } } if (SP_IS_TEXT(linked_obj)) { curve = SP_TEXT(linked_obj)->getNormalizedBpath(); -- cgit v1.2.3 From 58ef38f81c81f38149952f48e674a5fa5402bb98 Mon Sep 17 00:00:00 2001 From: Jabiertxo Arraiza Cenoz Date: Wed, 13 Sep 2017 18:35:35 +0200 Subject: Fixes for bug #1716926. Consider backport --- src/live_effects/parameter/path.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 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 470535314..a91e50db8 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -79,21 +79,24 @@ PathParam::PathParam( const Glib::ustring& label, const Glib::ustring& tip, PathParam::~PathParam() { remove_link(); - using namespace Inkscape::UI; - SPDesktop *desktop = SP_ACTIVE_DESKTOP; - if (desktop) { - if (tools_isactive(desktop, TOOLS_NODES)) { - SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem(); - if (item != NULL) { - Inkscape::UI::Tools::NodeTool *nt = static_cast(desktop->event_context); - std::set shapes; - ShapeRecord r; - r.item = item; - shapes.insert(r); - nt->_multipath->setItems(shapes); - } - } - } +//TODO: Removed to fix a bug https://bugs.launchpad.net/inkscape/+bug/1716926 +// Maybe wee need to resurrect, not know when this code is added, but seems also not working now in a few test I do. +// in the future and do a deeper fix in multi-path-manipulator +// using namespace Inkscape::UI; +// SPDesktop *desktop = SP_ACTIVE_DESKTOP; +// if (desktop) { +// if (tools_isactive(desktop, TOOLS_NODES)) { +// SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem(); +// if (item) { +// Inkscape::UI::Tools::NodeTool *nt = static_cast(desktop->event_context); +// std::set shapes; +// ShapeRecord r; +// r.item = item; +// shapes.insert(r); +// nt->_multipath->setItems(shapes); +// } +// } +// } g_free(defvalue); } -- cgit v1.2.3 From 1711a79b8604d9e6d936e25eaf966154ff122483 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Fri, 22 Sep 2017 18:00:59 +0200 Subject: Add tooltip to set default LPE widget --- src/live_effects/parameter/path.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (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 a91e50db8..bd6608737 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -173,6 +173,12 @@ PathParam::param_getSVGValue() const } } +gchar * +PathParam::param_getDefaultSVGValue() const +{ + return g_strdup(defvalue); +} + void PathParam::set_buttons(bool edit_button, bool copy_button, bool paste_button, bool link_button) { -- cgit v1.2.3