From 0f5574afd93303c82c1ae34fd1c59791c4d81217 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 30 Sep 2017 18:47:13 +0200 Subject: Fix bug #1719505 segfault on convert to path --- src/path-chemistry.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 7840c4ca8..6c4b67bef 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -368,7 +368,12 @@ sp_item_list_to_curves(const std::vector &items, std::vector& { continue; } - + //TODO: decide if we want to unlink clones or not, for now keep previous functionality retaining clones as is + SPUse *use = dynamic_cast(item); + if (use) { + continue; + } + SPPath *path = dynamic_cast(item); if (path && !path->_curve_before_lpe) { // remove connector attributes -- cgit v1.2.3 From e0957537cd0938313803c290a2f3922a3889e6f1 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 1 Oct 2017 17:49:26 +0200 Subject: Removed all GSList occurences in .h files --- src/path-chemistry.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 7840c4ca8..043d47517 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -237,13 +237,12 @@ ObjectSet::breakApart(bool skip_undo) item->deleteObject(false); - GSList *list = curve->split(); + std::list list = curve->split(); curve->unref(); std::vector reprs; - for (GSList *l = list; l != NULL; l = l->next) { - curve = (SPCurve *) l->data; + for (auto curve:list) { Inkscape::XML::Node *repr = parent->document()->createElement("svg:path"); repr->setAttribute("style", style); @@ -266,7 +265,7 @@ ObjectSet::breakApart(bool skip_undo) repr->setPosition(pos > 0 ? pos : 0); // if it's the first one, restore id - if (l == list) + if (curve == *(list.begin())) repr->setAttribute("id", id); reprs.push_back(repr); @@ -275,7 +274,6 @@ ObjectSet::breakApart(bool skip_undo) } setReprList(reprs); - g_slist_free(list); g_free(style); g_free(path_effect); } -- cgit v1.2.3 From ee527cbb228c6fba9c83bba5058d1a68ac647060 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 14 Oct 2017 21:29:10 +0200 Subject: Fixing problems with nested LPE and convert to paths --- src/path-chemistry.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 89cf6fb43..67a742ed2 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -556,8 +556,6 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/) return g_repr; } - - SP_LPE_ITEM(item)->removeAllPathEffects(true); SPCurve *curve = NULL; { SPShape *shape = dynamic_cast(item); -- cgit v1.2.3 From 01225070a051a96818fd9d0c218cafb982cdce21 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sun, 29 Oct 2017 13:56:41 +0100 Subject: Fix a bug converting to paths nested LPE with powerstroke --- src/path-chemistry.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 67a742ed2..b3b0c8076 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -398,9 +398,13 @@ sp_item_list_to_curves(const std::vector &items, std::vector& continue; } - + + SPLPEItem *lpeitem = dynamic_cast(item); + if (lpeitem) { + lpeitem->removeAllPathEffects(true); + } + if (group) { - group->removeAllPathEffects(true); std::vector item_list = sp_item_group_item_list(group); std::vector item_to_select; -- cgit v1.2.3 From 36216068dee24b54d67a35854d9160a9ec5f76dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A8le=20Duda?= Date: Tue, 31 Oct 2017 10:32:02 +0000 Subject: fix removing class when object to path --- src/path-chemistry.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index b3b0c8076..b824d15c7 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -430,6 +430,8 @@ sp_item_list_to_curves(const std::vector &items, std::vector& Inkscape::XML::Node *parent = item->getRepr()->parent(); // remember id char const *id = item->getRepr()->attribute("id"); + // remember class + char const *class_attr = item->getRepr()->attribute("class"); // remember title gchar *title = item->title(); // remember description @@ -444,6 +446,8 @@ sp_item_list_to_curves(const std::vector &items, std::vector& // restore id repr->setAttribute("id", id); + // restore class + repr->setAttribute("class", class_attr); // add the new repr to the parent parent->appendChild(repr); SPObject* newObj = document->getObjectByRepr(repr); -- cgit v1.2.3