summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-09-09 04:28:03 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-09-09 04:28:03 +0000
commit1c31310676b12bd4fd5e477192bf7bd9fffabf83 (patch)
treeb3e34b60fa87d0a79fe1011321ad5f6b50f44deb /src
parentThis commit is based on a coment on bug #1670644. And allow to fill the fill ... (diff)
downloadinkscape-1c31310676b12bd4fd5e477192bf7bd9fffabf83.tar.gz
inkscape-1c31310676b12bd4fd5e477192bf7bd9fffabf83.zip
Fix a bug when creating a cloned LPE with fill between many
Diffstat (limited to 'src')
-rw-r--r--src/object-set.h2
-rw-r--r--src/selection-chemistry.cpp8
-rw-r--r--src/ui/dialog/livepatheffect-editor.cpp2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/object-set.h b/src/object-set.h
index 82d2988c7..c5e190136 100644
--- a/src/object-set.h
+++ b/src/object-set.h
@@ -370,7 +370,7 @@ public:
bool unlinkRecursive(const bool skip_undo = false);
void relink();
void cloneOriginal();
- void cloneOriginalPathLPE();
+ void cloneOriginalPathLPE(bool allow_transforms = false);
Inkscape::XML::Node* group();
void popFromGroup();
void ungroup();
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index f4e37d7e9..f23a49500 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -2917,7 +2917,7 @@ void ObjectSet::cloneOriginal()
/**
* This creates a new path, applies the Original Path LPE, and has it refer to the selection.
*/
-void ObjectSet::cloneOriginalPathLPE()
+void ObjectSet::cloneOriginalPathLPE(bool allow_transforms)
{
Inkscape::SVGOStringStream os;
@@ -2930,7 +2930,7 @@ void ObjectSet::cloneOriginalPathLPE()
} else {
firstItem = SP_ITEM(*i);
}
- os << '#' << SP_ITEM(*i)->getId() << ",0";
+ os << '#' << SP_ITEM(*i)->getId() << ",0,1";
}
}
if (firstItem) {
@@ -2942,7 +2942,9 @@ void ObjectSet::cloneOriginalPathLPE()
{
lpe_repr->setAttribute("effect", "fill_between_many");
lpe_repr->setAttribute("linkedpaths", os.str());
- lpe_repr->setAttribute("retain_original", "false");
+ lpe_repr->setAttribute("original_visible", "false");
+ gchar const *allow_transforms_str = allow_transforms ? "true" : "false";
+ lpe_repr->setAttribute("allow_transforms", allow_transforms_str);
document()->getDefs()->getRepr()->addChild(lpe_repr, NULL); // adds to <defs> and assigns the 'id' attribute
}
std::string lpe_id_href = std::string("#") + lpe_repr->attribute("id");
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index 98789f7b2..02f76dbbb 100644
--- a/src/ui/dialog/livepatheffect-editor.cpp
+++ b/src/ui/dialog/livepatheffect-editor.cpp
@@ -473,7 +473,7 @@ LivePathEffectEditor::onAdd()
item = NULL;
// run sp_selection_clone_original_path_lpe
- sel->cloneOriginalPathLPE();
+ sel->cloneOriginalPathLPE(true);
SPItem *new_item = sel->singleItem();
// Check that the cloning was successful. We don't want to change the ID of the original referenced path!