summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/path.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
commitd2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch)
treee2703384779e83312c456399999997fcc289c5cf /src/live_effects/parameter/path.cpp
parentMerge branch 'master' into powerpencil (diff)
parentchange assignment to equality (diff)
downloadinkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz
inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/live_effects/parameter/path.cpp')
-rw-r--r--src/live_effects/parameter/path.cpp46
1 files changed, 30 insertions, 16 deletions
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index ec011b855..bd6608737 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;
@@ -78,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<Inkscape::UI::Tools::NodeTool*>(desktop->event_context);
- std::set<ShapeRecord> 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<Inkscape::UI::Tools::NodeTool*>(desktop->event_context);
+// std::set<ShapeRecord> shapes;
+// ShapeRecord r;
+// r.item = item;
+// shapes.insert(r);
+// nt->_multipath->setItems(shapes);
+// }
+// }
+// }
g_free(defvalue);
}
@@ -169,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)
{
@@ -444,7 +454,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();