From e6fb3530bee1ba272d7399f26634b27a335798cb Mon Sep 17 00:00:00 2001 From: Jabiertxo Arraiza Cenoz Date: Thu, 7 Dec 2017 11:02:44 +0100 Subject: This commit: *Allow boolops operation with non paths converting them to path first *Allow convert to stroke non paths converting previously to paths *Allow combine with use elements converting it to paths first *Allow convert to curves use/clone elements converting to curves --- src/path-chemistry.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index b824d15c7..9ad6c8c76 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -55,7 +55,7 @@ ObjectSet::combine(bool skip_undo) { //Inkscape::Selection *selection = desktop->getSelection(); SPDocument *doc = document(); - + unlinkRecursive(true); std::vector items_copy(items().begin(), items().end()); if (items_copy.size() < 1) { @@ -299,14 +299,14 @@ void ObjectSet::toCurves(bool skip_undo) desktop()->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select object(s) to convert to path.")); return; } - + bool did = false; if (desktop()) { desktop()->messageStack()->flash(Inkscape::IMMEDIATE_MESSAGE, _("Converting objects to paths...")); // set "busy" cursor desktop()->setWaitingCursor(); } - + unlinkRecursive(true); std::vector selected(items().begin(), items().end()); std::vector to_select; clear(); @@ -337,7 +337,7 @@ void ObjectSet::toLPEItems() if (isEmpty()) { return; } - + unlinkRecursive(true); std::vector selected(items().begin(), items().end()); std::vector to_select; clear(); @@ -366,12 +366,7 @@ 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 aeb9391d258b5f76c64333633286abf841d508c5 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Thu, 7 Dec 2017 15:45:26 +0100 Subject: Make optional convert clone to path by a prefs option --- src/path-chemistry.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 9ad6c8c76..d87dd96cd 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -55,7 +55,10 @@ ObjectSet::combine(bool skip_undo) { //Inkscape::Selection *selection = desktop->getSelection(); SPDocument *doc = document(); - unlinkRecursive(true); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs->getBool("/options/pathoperationsunlink/value", true)) { + unlinkRecursive(true); + } std::vector items_copy(items().begin(), items().end()); if (items_copy.size() < 1) { @@ -306,7 +309,10 @@ void ObjectSet::toCurves(bool skip_undo) // set "busy" cursor desktop()->setWaitingCursor(); } - unlinkRecursive(true); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs->getBool("/options/pathoperationsunlink/value", true)) { + unlinkRecursive(true); + } std::vector selected(items().begin(), items().end()); std::vector to_select; clear(); @@ -337,7 +343,10 @@ void ObjectSet::toLPEItems() if (isEmpty()) { return; } - unlinkRecursive(true); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs->getBool("/options/pathoperationsunlink/value", true)) { + unlinkRecursive(true); + } std::vector selected(items().begin(), items().end()); std::vector to_select; clear(); -- cgit v1.2.3 From 4b8609e0cce219ec683e8901d1c47abec07bf022 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 9 Dec 2017 02:14:27 +0100 Subject: Add break apart. Thanks Maren --- src/path-chemistry.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index d87dd96cd..9e75b7841 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -56,9 +56,6 @@ ObjectSet::combine(bool skip_undo) //Inkscape::Selection *selection = desktop->getSelection(); SPDocument *doc = document(); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - if (prefs->getBool("/options/pathoperationsunlink/value", true)) { - unlinkRecursive(true); - } std::vector items_copy(items().begin(), items().end()); if (items_copy.size() < 1) { -- cgit v1.2.3