summaryrefslogtreecommitdiffstats
path: root/src/path-chemistry.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-06-02 22:06:18 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-06-02 22:06:18 +0000
commit344c6e8f6489b820f81b1adde1d9717720311eb3 (patch)
tree57a7ea9fb4e099f632bfb39c8345f3dde999ed27 /src/path-chemistry.cpp
parentAdd preview to Font Features tab of Text and Font dialog. (diff)
downloadinkscape-344c6e8f6489b820f81b1adde1d9717720311eb3.tar.gz
inkscape-344c6e8f6489b820f81b1adde1d9717720311eb3.zip
Fixes on convert to paths LPE shapes
Diffstat (limited to '')
-rw-r--r--src/path-chemistry.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 95b55a829..ac212388b 100644
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -393,12 +393,22 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>&
continue;
}
-
+ // remember id
+ char const *id = item->getRepr()->attribute("id");
+
SPLPEItem *lpeitem = dynamic_cast<SPLPEItem *>(item);
if (lpeitem) {
+ selected.erase(remove(selected.begin(), selected.end(), item), selected.end());
lpeitem->removeAllPathEffects(true);
+ SPObject *elemref = NULL;
+ if (elemref = document->getObjectById(id)) {
+ //If the LPE item is a shape is converted to a path so we need to reupdate the item
+
+ item = dynamic_cast<SPItem *>(elemref);
+ selected.push_back(item);
+ }
}
-
+
SPPath *path = dynamic_cast<SPPath *>(item);
if (path) {
// remove connector attributes
@@ -436,10 +446,8 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>&
gint pos = item->getRepr()->position();
// remember parent
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");
+ char const *class_attr = item->getRepr()->attribute("class");
// remember title
gchar *title = item->title();
// remember description