summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-05-16 10:28:42 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-05-16 10:28:42 +0000
commitaf0a3ca0fa6b70fd4e11cd847ad8f0193063f7e2 (patch)
tree453d89314a531ebcdf1a3ae351a90c92140d81c1 /src/live_effects
parentRemove clang format diff unwanted file (diff)
downloadinkscape-af0a3ca0fa6b70fd4e11cd847ad8f0193063f7e2.tar.gz
inkscape-af0a3ca0fa6b70fd4e11cd847ad8f0193063f7e2.zip
Fix a bug on reloading LPE Clone effect
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/lpe-clone-original.cpp8
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp2
-rw-r--r--src/live_effects/lpe-powerclip.cpp1
3 files changed, 6 insertions, 5 deletions
diff --git a/src/live_effects/lpe-clone-original.cpp b/src/live_effects/lpe-clone-original.cpp
index f797812f5..f239c6acf 100644
--- a/src/live_effects/lpe-clone-original.cpp
+++ b/src/live_effects/lpe-clone-original.cpp
@@ -136,7 +136,9 @@ LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, const gchar *
if (strlen(attribute)) {
if ( shape_dest && shape_origin && (std::strcmp(attribute, "d") == 0)) {
SPCurve *c = nullptr;
- if (method == CLM_BSPLINESPIRO || (previous_method == CLM_BSPLINESPIRO && method == CLM_CURRENT)) {
+ if (method == CLM_CURRENT && (previous_method == CLM_CURRENT || is_load)) {
+ c = shape_dest->getCurve();
+ } else if (method == CLM_BSPLINESPIRO || (previous_method == CLM_BSPLINESPIRO && method == CLM_CURRENT)) {
c = shape_origin->getCurveForEdit();
SPLPEItem * lpe_item = SP_LPE_ITEM(origin);
if (lpe_item) {
@@ -167,9 +169,7 @@ LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, const gchar *
if (method == CLM_CURRENT) {
shape_dest->setCurveBeforeLPE(c);
}
- } else if (method == CLM_CURRENT && previous_method == CLM_CURRENT) {
- c = shape_dest->getCurve();
- } else {
+ } else if(method == CLM_D || (previous_method == CLM_D && method == CLM_CURRENT)){
c = shape_origin->getCurve();
if (method == CLM_CURRENT) {
shape_dest->setCurveBeforeLPE(c);
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index be0165776..e4411990c 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -110,8 +110,8 @@ LPECopyRotate::~LPECopyRotate()
void
LPECopyRotate::doAfterEffect (SPLPEItem const* lpeitem)
{
+ is_load = false;
if (split_items) {
- is_load = false;
SPDocument * document = SP_ACTIVE_DOCUMENT;
if (!document) {
return;
diff --git a/src/live_effects/lpe-powerclip.cpp b/src/live_effects/lpe-powerclip.cpp
index 432f2a40d..877c99524 100644
--- a/src/live_effects/lpe-powerclip.cpp
+++ b/src/live_effects/lpe-powerclip.cpp
@@ -128,6 +128,7 @@ LPEPowerClip::doBeforeEffect (SPLPEItem const* lpeitem){
void
LPEPowerClip::doAfterEffect (SPLPEItem const* lpeitem){
+ is_load = false;
if (!hide_clip && flatten && isVisible()) {
SP_ITEM(sp_lpe_item)->clip_ref->detach();
}