summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-04-14 16:50:20 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-04-14 16:50:20 +0000
commit75fa525a68af3ac9826dca66f00fb01f6efa3c51 (patch)
tree3c866e9cb68cbef7572cd79ce9eb687d9f97c050 /src
parentAdd files missing in last commit (FontSelector). (diff)
downloadinkscape-75fa525a68af3ac9826dca66f00fb01f6efa3c51.tar.gz
inkscape-75fa525a68af3ac9826dca66f00fb01f6efa3c51.zip
Fixes to transforms on LPE
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-clone-original.cpp146
-rw-r--r--src/live_effects/lpe-clone-original.h9
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp1
-rw-r--r--src/live_effects/lpe-fill-between-many.cpp27
-rw-r--r--src/live_effects/lpe-fill-between-many.h1
-rw-r--r--src/live_effects/lpe-fill-between-strokes.cpp30
-rw-r--r--src/live_effects/lpe-fill-between-strokes.h2
-rw-r--r--src/live_effects/lpe-measure-segments.cpp19
-rw-r--r--src/live_effects/lpe-measure-segments.h2
-rw-r--r--src/live_effects/lpe-powerclip.cpp5
-rw-r--r--src/live_effects/lpe-powerclip.h2
-rw-r--r--src/live_effects/parameter/originalpatharray.cpp1
-rw-r--r--src/object/sp-item.cpp7
-rw-r--r--src/object/sp-lpe-item.cpp21
14 files changed, 84 insertions, 189 deletions
diff --git a/src/live_effects/lpe-clone-original.cpp b/src/live_effects/lpe-clone-original.cpp
index 7c063fc83..a5290998e 100644
--- a/src/live_effects/lpe-clone-original.cpp
+++ b/src/live_effects/lpe-clone-original.cpp
@@ -52,21 +52,20 @@ LPECloneOriginal::LPECloneOriginal(LivePathEffectObject *lpeobject) :
};
is_updating = false;
listening = false;
- linked = g_strdup(this->getRepr()->attribute("linkeditem"));
+ linked = this->getRepr()->attribute("linkeditem");
registerParameter(&linkeditem);
registerParameter(&method);
registerParameter(&attributes);
registerParameter(&style_attributes);
registerParameter(&allow_transforms);
- prev_allow_trans = allow_transforms;
previus_method = method;
- prev_affine = g_strdup("");
+ position_diff = Geom::Point(0,0);
attributes.param_hide_canvas_text();
style_attributes.param_hide_canvas_text();
}
void
-LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, const char * attributes, const char * style_attributes)
+LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, const gchar * attributes, const gchar * style_attributes)
{
SPDocument * document = SP_ACTIVE_DOCUMENT;
if (!document || !origin || !dest) {
@@ -83,11 +82,12 @@ LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, const char *
}
}
//Attributes
- SPShape * shape_origin = SP_SHAPE(origin);
- SPPath * path_origin = SP_PATH(origin);
- SPShape * shape_dest = SP_SHAPE(dest);
- SPMask *mask_origin = SP_ITEM(origin)->mask_ref->getObject();
- SPMask *mask_dest = SP_ITEM(dest)->mask_ref->getObject();
+ SPShape * shape_origin = SP_SHAPE(origin);
+ SPPath * path_origin = SP_PATH(origin);
+ SPShape * shape_dest = SP_SHAPE(dest);
+ SPPath * path_dest = SP_PATH(dest);
+ SPMask * mask_origin = SP_ITEM(origin)->mask_ref->getObject();
+ SPMask * mask_dest = SP_ITEM(dest)->mask_ref->getObject();
if(mask_origin && mask_dest) {
std::vector<SPObject*> mask_list = mask_origin->childList(true);
std::vector<SPObject*> mask_list_dest = mask_dest->childList(true);
@@ -141,23 +141,28 @@ LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, const char *
}
}
}
- } else if(method == CLM_ORIGINALD) {
+ } else if (method == CLM_ORIGINALD) {
c = shape_origin->getCurveForEdit();
+ } else if (method == CLM_NONE) {
+ c = shape_dest->getCurve();
} else {
c = shape_origin->getCurve();
}
if (c) {
Geom::PathVector c_pv = c->get_pathvector();
- c_pv *= i2anc_affine(dest, sp_lpe_item);
- c->set_pathvector(c_pv);
- if (!path_origin) {
- shape_dest->setCurveBeforeLPE(c);
- gchar *str = sp_svg_write_path(c_pv);
- dest->getRepr()->setAttribute(attribute, str);
- g_free(str);
- } else {
- shape_dest->setCurveBeforeLPE(c);
+ if (method != CLM_NONE) {
+ c_pv *= SP_ITEM(origin)->transform;
+ if (allow_transforms) {
+ c_pv *= Geom::Translate(position_diff);
+ } else {
+ c_pv *= SP_ITEM(dest)->transform.inverse();
+ }
}
+ c->set_pathvector(c_pv);
+ shape_dest->setCurveInsync(c);
+ gchar *str = sp_svg_write_path(c_pv);
+ dest->getRepr()->setAttribute("d", str);
+ g_free(str);
c->unref();
} else {
dest->getRepr()->setAttribute(attribute, NULL);
@@ -190,16 +195,17 @@ LPECloneOriginal::cloneAttrbutes(SPObject *origin, SPObject *dest, const char *
g_strfreev (styleattarray);
Glib::ustring css_str;
sp_repr_css_write_string(css_dest,css_str);
- dest->getRepr()->setAttribute("style", g_strdup(css_str.c_str()));
+ dest->getRepr()->setAttribute("style", css_str.c_str());
}
void
LPECloneOriginal::doBeforeEffect (SPLPEItem const* lpeitem){
start_listening();
+ SPDocument * document = SP_ACTIVE_DOCUMENT;
+ if (!document) {
+ return;
+ }
if (linkeditem.linksToItem()) {
- Glib::ustring attr = "";
- if (method != CLM_NONE) {
- attr += Glib::ustring("d,");
- }
+ Glib::ustring attr = "d,";
gchar * attributes_str = attributes.param_getSVGValue();
attr += Glib::ustring(attributes_str) + Glib::ustring(",");
if (attr.size() && !Glib::ustring(attributes_str).size()) {
@@ -217,59 +223,18 @@ LPECloneOriginal::doBeforeEffect (SPLPEItem const* lpeitem){
return;
}
SPItem * dest = SP_ITEM(sp_lpe_item);
- Geom::OptRect o_bbox = orig->geometricBounds();
- Geom::OptRect d_bbox = dest->geometricBounds();
- gchar * id = g_strdup(orig->getId());
- if (allow_transforms &&
- !linkeditem.last_transform.isIdentity() &&
- linkeditem.last_transform.isTranslation() &&
- method != CLM_NONE)
- {
- Geom::Point expansion_dest = dest->transform.expansion();
- Geom::Point expansion_orig = orig->transform.expansion();
- dest->transform *= Geom::Scale(expansion_dest).inverse();
- dest->transform *= Geom::Scale(expansion_orig);
- dest->transform *= linkeditem.last_transform.inverse();
- dest->transform *= Geom::Scale(expansion_orig).inverse();
- dest->transform *= Geom::Scale(expansion_dest);
- }
- if ((strcmp(id, linked) != 0 || (previus_method != method && previus_method == CLM_NONE )) &&
- allow_transforms &&
- o_bbox &&
- d_bbox)
- {
- dest->transform *= Geom::Translate((*o_bbox).corner(0) - (*d_bbox).corner(0)).inverse();
- }
- cloneAttrbutes(orig, dest, g_strdup(attr.c_str()), g_strdup(style_attr.c_str()));
- if (allow_transforms &&
- previus_method != method &&
- method == CLM_NONE)
- {
- dest->transform *= Geom::Translate((*d_bbox).corner(0) - (*o_bbox).corner(0)).inverse();
- }
-
- if (!allow_transforms) {
- SP_ITEM(dest)->getRepr()->setAttribute("transform", SP_ITEM(orig)->getAttribute("transform"));
- } else {
- SP_ITEM(dest)->getRepr()->setAttribute("transform", sp_svg_transform_write(dest->transform));
- if (prev_allow_trans == allow_transforms) {
- prev_affine = g_strdup(SP_ITEM(dest)->getAttribute("transform"));
- }
- }
-
- if (prev_allow_trans != allow_transforms && allow_transforms) {
- SP_ITEM(dest)->getRepr()->setAttribute("transform", prev_affine);
+ Geom::OptRect o_bbox = orig->geometricBounds(orig->transform);
+ Geom::OptRect d_bbox = dest->geometricBounds(dest->transform);
+ const gchar * id = orig->getId();
+ if (linked != id) {
+ position_diff = (*d_bbox).corner(0) - (*o_bbox).corner(0);
}
-
- linked = g_strdup(id);
- g_free(style_attributes_str);
- g_free(attributes_str);
- g_free(id);
+ cloneAttrbutes(orig, dest, attr.c_str(), style_attr.c_str());
+ linked = id;
} else {
- linked = g_strdup("");
+ linked = "";
}
previus_method = method;
- prev_allow_trans = allow_transforms;
}
void
@@ -304,45 +269,12 @@ LPECloneOriginal::modified(SPObject */*obj*/, guint /*flags*/)
LPECloneOriginal::~LPECloneOriginal()
{
quit_listening();
- g_free(linked);
- g_free(prev_affine);
-}
-
-void
-LPECloneOriginal::transform_multiply(Geom::Affine const& postmul, bool set)
-{
- if (!allow_transforms && linkeditem.linksToItem()) {
- sp_lpe_item->transform *= postmul.inverse();
- }
-}
-
-void LPECloneOriginal::doOnRemove(SPLPEItem const* lpeitem)
-{
- if (linkeditem.linksToItem() && lpeitem->path_effect_list->size() == 1 && !keep_paths) {
- SPDesktop * dt = SP_ACTIVE_DESKTOP;
- SPObject * obj = dynamic_cast<SPObject*>(sp_lpe_item);
- SPItem * orig = SP_ITEM(linkeditem.getObject());
- if(!orig) {
- return;
- }
- const gchar * transform = lpeitem->getRepr()->attribute("transform");
- dt->selection->clear();
- dt->selection->add(orig, true);
- dt->selection->clone();
- dt->selection->singleItem()->setAttribute("transform" , transform);
- //TODO: get a way to realy delete current LPEItem
- obj->getRepr()->setAttribute("original-d", NULL);
- obj->getRepr()->setAttribute("d", "0,0");
- obj->getRepr()->setAttribute("inkscape:label", "SAFE TO REMOVE");
- obj->getRepr()->setAttribute("inkscape:connector-curvature", NULL);
- obj->getRepr()->setAttribute("transform", NULL);
- obj->getRepr()->setAttribute("style", "opacity:0");
- }
}
void
LPECloneOriginal::doEffect (SPCurve * curve)
{
+ curve->set_pathvector(current_shape->getCurve()->get_pathvector());
}
} // namespace LivePathEffect
diff --git a/src/live_effects/lpe-clone-original.h b/src/live_effects/lpe-clone-original.h
index a5a84c31a..d1fec49a3 100644
--- a/src/live_effects/lpe-clone-original.h
+++ b/src/live_effects/lpe-clone-original.h
@@ -33,9 +33,7 @@ public:
virtual ~LPECloneOriginal();
virtual void doEffect (SPCurve * curve);
virtual void doBeforeEffect (SPLPEItem const* lpeitem);
- virtual void doOnRemove(SPLPEItem const* lpeitem);
- virtual void transform_multiply(Geom::Affine const& postmul, bool set);
- void cloneAttrbutes(SPObject *origin, SPObject *dest, const char * attributes, const char * style_attributes);
+ void cloneAttrbutes(SPObject *origin, SPObject *dest, const gchar * attributes, const gchar * style_attributes);
void modified(SPObject */*obj*/, guint /*flags*/);
void start_listening();
void quit_listening();
@@ -46,12 +44,11 @@ private:
TextParam attributes;
TextParam style_attributes;
BoolParam allow_transforms;
- gchar * linked;
+ const gchar * linked;
Clonelpemethod previus_method;
bool listening;
bool is_updating;
- bool prev_allow_trans;
- gchar * prev_affine;
+ Geom::Point position_diff;
sigc::connection modified_connection;
LPECloneOriginal(const LPECloneOriginal&);
LPECloneOriginal& operator=(const LPECloneOriginal&);
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index 8071c19d2..74ee0cfda 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -373,7 +373,6 @@ LPECopyRotate::transform_multiply(Geom::Affine const& postmul, bool set)
param->param_transform_multiply(postmul, set);
}
}
- sp_lpe_item_update_patheffect(sp_lpe_item, false, false);
}
void
diff --git a/src/live_effects/lpe-fill-between-many.cpp b/src/live_effects/lpe-fill-between-many.cpp
index 85b78f688..9715d7ff8 100644
--- a/src/live_effects/lpe-fill-between-many.cpp
+++ b/src/live_effects/lpe-fill-between-many.cpp
@@ -128,35 +128,28 @@ void LPEFillBetweenMany::doEffect (SPCurve * curve)
} else {
linked_path = (*iter)->_pathvector.front();
}
-
+ if (obj) {
+ linked_path *= SP_ITEM(obj)->transform;
+ }
+
if (!res_pathv.empty() && join) {
if (!are_near(res_pathv.front().finalPoint(), linked_path.initialPoint(), 0.01) || !fuse) {
res_pathv.front().appendNew<Geom::LineSegment>(linked_path.initialPoint());
} else {
linked_path.setInitial(res_pathv.front().finalPoint());
}
- if(!allow_transforms) {
- Geom::Affine affine = Geom::identity();
- sp_svg_transform_read(SP_ITEM(obj)->getAttribute("transform"), &affine);
- linked_path *= affine;
- }
res_pathv.front().append(linked_path);
} else {
if (close && !join) {
linked_path.close();
}
- if(!allow_transforms) {
- Geom::Affine affine = Geom::identity();
- sp_svg_transform_read(SP_ITEM(obj)->getAttribute("transform"), &affine);
- linked_path *= affine;
- }
res_pathv.push_back(linked_path);
}
}
}
- if(!allow_transforms && sp_lpe_item) {
- SP_ITEM(sp_lpe_item)->transform = Geom::identity();
+ if(!allow_transforms) {
+ SP_ITEM(sp_lpe_item)->setAttribute("transform", NULL);
}
if (!res_pathv.empty() && close) {
@@ -170,14 +163,6 @@ void LPEFillBetweenMany::doEffect (SPCurve * curve)
curve->set_pathvector(res_pathv);
}
-void
-LPEFillBetweenMany::transform_multiply(Geom::Affine const& postmul, bool set)
-{
- if(!allow_transforms && sp_lpe_item) {
- SP_ITEM(sp_lpe_item)->transform *= postmul.inverse();
- }
-}
-
} // namespace LivePathEffect
} /* namespace Inkscape */
diff --git a/src/live_effects/lpe-fill-between-many.h b/src/live_effects/lpe-fill-between-many.h
index 7ff998309..b03ec6bc3 100644
--- a/src/live_effects/lpe-fill-between-many.h
+++ b/src/live_effects/lpe-fill-between-many.h
@@ -29,7 +29,6 @@ public:
LPEFillBetweenMany(LivePathEffectObject *lpeobject);
virtual ~LPEFillBetweenMany();
virtual void doOnApply (SPLPEItem const* lpeitem);
- virtual void transform_multiply(Geom::Affine const& postmul, bool set);
virtual void doEffect (SPCurve * curve);
private:
diff --git a/src/live_effects/lpe-fill-between-strokes.cpp b/src/live_effects/lpe-fill-between-strokes.cpp
index 37d13830c..5f4fd4fc2 100644
--- a/src/live_effects/lpe-fill-between-strokes.cpp
+++ b/src/live_effects/lpe-fill-between-strokes.cpp
@@ -31,7 +31,6 @@ LPEFillBetweenStrokes::LPEFillBetweenStrokes(LivePathEffectObject *lpeobject) :
registerParameter(&allow_transforms);
registerParameter(&join);
registerParameter(&close);
- transformmultiply = false;
}
LPEFillBetweenStrokes::~LPEFillBetweenStrokes()
@@ -43,26 +42,29 @@ void LPEFillBetweenStrokes::doEffect (SPCurve * curve)
{
if (curve) {
Geom::Affine affine = Geom::identity();
- if(!allow_transforms && !transformmultiply) {
- sp_svg_transform_read(SP_ITEM(sp_lpe_item)->getAttribute("transform"), &affine);
- }
- if(transformmultiply) {
- transformmultiply = false;
+ if(!allow_transforms) {
+ SP_ITEM(sp_lpe_item)->setAttribute("transform", NULL);
}
if ( linked_path.linksToPath() && second_path.linksToPath() && linked_path.getObject() && second_path.getObject() ) {
Geom::PathVector linked_pathv = linked_path.get_pathvector();
+ SPItem * linked1 = linked_path.getObject();
+ if (linked1) {
+ linked_pathv *= linked1->transform;
+ }
Geom::PathVector second_pathv = second_path.get_pathvector();
+ SPItem * linked2 = second_path.getObject();
+ if (linked2) {
+ second_pathv*= linked2->transform;
+ }
Geom::PathVector result_linked_pathv;
Geom::PathVector result_second_pathv;
- Geom::Affine second_transform = second_path.getObject()->getRelativeTransform(linked_path.getObject());
-
for (Geom::PathVector::iterator iter = linked_pathv.begin(); iter != linked_pathv.end(); ++iter)
{
result_linked_pathv.push_back((*iter));
}
for (Geom::PathVector::iterator iter = second_pathv.begin(); iter != second_pathv.end(); ++iter)
{
- result_second_pathv.push_back((*iter) * second_transform);
+ result_second_pathv.push_back((*iter));
}
if ( !result_linked_pathv.empty() && !result_second_pathv.empty() && !result_linked_pathv.front().closed() ) {
@@ -131,16 +133,6 @@ void LPEFillBetweenStrokes::doEffect (SPCurve * curve)
}
}
-void
-LPEFillBetweenStrokes::transform_multiply(Geom::Affine const& postmul, bool set)
-{
- if(!allow_transforms && sp_lpe_item) {
- SP_ITEM(sp_lpe_item)->transform *= postmul.inverse();
- transformmultiply = true;
- sp_lpe_item_update_patheffect(sp_lpe_item, false, false);
- }
-}
-
} // namespace LivePathEffect
} /* namespace Inkscape */
diff --git a/src/live_effects/lpe-fill-between-strokes.h b/src/live_effects/lpe-fill-between-strokes.h
index 5bbd6e7da..d4bf75d01 100644
--- a/src/live_effects/lpe-fill-between-strokes.h
+++ b/src/live_effects/lpe-fill-between-strokes.h
@@ -19,7 +19,6 @@ class LPEFillBetweenStrokes : public Effect {
public:
LPEFillBetweenStrokes(LivePathEffectObject *lpeobject);
virtual ~LPEFillBetweenStrokes();
- virtual void transform_multiply(Geom::Affine const& postmul, bool set);
virtual void doEffect (SPCurve * curve);
private:
@@ -30,7 +29,6 @@ private:
BoolParam allow_transforms;
BoolParam join;
BoolParam close;
- bool transformmultiply;
private:
LPEFillBetweenStrokes(const LPEFillBetweenStrokes&);
diff --git a/src/live_effects/lpe-measure-segments.cpp b/src/live_effects/lpe-measure-segments.cpp
index 3350b0277..031f2ad76 100644
--- a/src/live_effects/lpe-measure-segments.cpp
+++ b/src/live_effects/lpe-measure-segments.cpp
@@ -143,7 +143,6 @@ LPEMeasureSegments::LPEMeasureSegments(LivePathEffectObject *lpeobject) :
helpline_overlap.param_set_range(-999999.0, 999999.0);
helpline_overlap.param_set_increments(1, 1);
helpline_overlap.param_set_digits(2);
- star_ellipse_fix = Geom::identity();
locale_base = strdup(setlocale(LC_NUMERIC, NULL));
message.param_set_min_height(85);
previous_size = 0;
@@ -640,12 +639,7 @@ LPEMeasureSegments::doBeforeEffect (SPLPEItem const* lpeitem)
c->unref();
Geom::Affine writed_transform = Geom::identity();
sp_svg_transform_read(splpeitem->getAttribute("transform"), &writed_transform );
- if (star_ellipse_fix != Geom::identity()) {
- pathvector *= star_ellipse_fix;
- star_ellipse_fix = Geom::identity();
- } else {
- pathvector *= writed_transform;
- }
+ pathvector *= writed_transform;
gchar * format_str = format.param_getSVGValue();
if (Glib::ustring(format_str).empty()) {
format.param_setValue(Glib::ustring("{measure}{unit}"));
@@ -949,17 +943,6 @@ LPEMeasureSegments::doOnRemove (SPLPEItem const* /*lpeitem*/)
processObjects(LPE_ERASE);
}
-void
-LPEMeasureSegments::transform_multiply(Geom::Affine const& postmul, bool set)
-{
- SPStar * star = dynamic_cast<SPStar *>(sp_lpe_item);
- SPSpiral * spiral = dynamic_cast<SPSpiral *>(sp_lpe_item);
- if((spiral || star) && !postmul.withoutTranslation().isUniformScale()) {
- star_ellipse_fix = postmul;
- sp_lpe_item_update_patheffect(sp_lpe_item, false, false);
- }
-}
-
}; //namespace LivePathEffect
}; /* namespace Inkscape */
diff --git a/src/live_effects/lpe-measure-segments.h b/src/live_effects/lpe-measure-segments.h
index 1b6a5a81d..ca7cfb931 100644
--- a/src/live_effects/lpe-measure-segments.h
+++ b/src/live_effects/lpe-measure-segments.h
@@ -41,7 +41,6 @@ public:
virtual void doOnRemove(SPLPEItem const* /*lpeitem*/);
virtual void doEffect(SPCurve * curve){}; //stop the chain
virtual void doOnVisibilityToggled(SPLPEItem const* /*lpeitem*/);
- virtual void transform_multiply(Geom::Affine const& postmul, bool set);
void createLine(Geom::Point start,Geom::Point end, Glib::ustring name, size_t counter, bool main, bool remove, bool arrows = false);
void createTextLabel(Geom::Point pos, size_t counter, double length, Geom::Coord angle, bool remove, bool valid);
void createArrowMarker(Glib::ustring mode);
@@ -77,7 +76,6 @@ private:
unsigned rgb24;
double arrow_gap;
gchar const* locale_base;
- Geom::Affine star_ellipse_fix;
LPEMeasureSegments(const LPEMeasureSegments &);
LPEMeasureSegments &operator=(const LPEMeasureSegments &);
diff --git a/src/live_effects/lpe-powerclip.cpp b/src/live_effects/lpe-powerclip.cpp
index b27dea3e7..b4c342930 100644
--- a/src/live_effects/lpe-powerclip.cpp
+++ b/src/live_effects/lpe-powerclip.cpp
@@ -29,13 +29,16 @@ LPEPowerClip::LPEPowerClip(LivePathEffectObject *lpeobject)
is_inverse("Store the last inverse apply", "", "is_inverse", &wr, this, "false", false),
uri("Store the uri of clip", "", "uri", &wr, this, "false", false),
inverse(_("Inverse clip"), _("Inverse clip"), "inverse", &wr, this, false),
- flatten(_("Flatten clip"), _("Flatten clip, see fill rule once convert to paths"), "flatten", &wr, this, false)
+ flatten(_("Flatten clip"), _("Flatten clip, see fill rule once convert to paths"), "flatten", &wr, this, false),
+ message(_("Info Box"), _("Important messages"), "message", &wr, this, _("Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths."))
{
registerParameter(&uri);
registerParameter(&inverse);
registerParameter(&flatten);
registerParameter(&hide_clip);
registerParameter(&is_inverse);
+ registerParameter(&message);
+ message.param_set_min_height(55);
convert_shapes = false;
}
diff --git a/src/live_effects/lpe-powerclip.h b/src/live_effects/lpe-powerclip.h
index 240a1809b..3aa963c71 100644
--- a/src/live_effects/lpe-powerclip.h
+++ b/src/live_effects/lpe-powerclip.h
@@ -8,6 +8,7 @@
*/
#include "live_effects/effect.h"
+#include "live_effects/parameter/message.h"
#include "live_effects/parameter/hidden.h"
namespace Inkscape {
@@ -34,6 +35,7 @@ private:
BoolParam inverse;
BoolParam flatten;
BoolParam hide_clip;
+ MessageParam message;
Geom::Path clip_box;
Geom::Affine base;
bool convert_shapes;
diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp
index 928bf2976..70f17ccb8 100644
--- a/src/live_effects/parameter/originalpatharray.cpp
+++ b/src/live_effects/parameter/originalpatharray.cpp
@@ -458,6 +458,7 @@ void OriginalPathArrayParam::setPathVector(SPObject *linked_obj, guint /*flags*/
to->_pathvector = curve->get_pathvector();
curve->unref();
}
+
}
void OriginalPathArrayParam::linked_modified(SPObject *linked_obj, guint flags, PathAndDirectionAndVisible* to)
diff --git a/src/object/sp-item.cpp b/src/object/sp-item.cpp
index a228d9313..4b4d3e7cd 100644
--- a/src/object/sp-item.cpp
+++ b/src/object/sp-item.cpp
@@ -1536,14 +1536,17 @@ void SPItem::doWriteTransform(Geom::Affine const &transform, Geom::Affine const
}
set_item_transform(transform_attr);
-
-
// Note: updateRepr comes before emitting the transformed signal since
// it causes clone SPUse's copy of the original object to brought up to
// date with the original. Otherwise, sp_use_bbox returns incorrect
// values if called in code handling the transformed signal.
updateRepr();
+ SPLPEItem * lpeitem = SP_LPE_ITEM(this);
+ if (lpeitem && lpeitem->hasPathEffectRecursive()) {
+ sp_lpe_item_update_patheffect(lpeitem, false, false);
+ }
+
// send the relative transform with a _transformed_signal
_transformed_signal.emit(&advertized_transform, this);
}
diff --git a/src/object/sp-lpe-item.cpp b/src/object/sp-lpe-item.cpp
index abe08a1dc..7ff0a88d6 100644
--- a/src/object/sp-lpe-item.cpp
+++ b/src/object/sp-lpe-item.cpp
@@ -420,6 +420,9 @@ sp_lpe_item_cleanup_original_path_recursive(SPLPEItem *lpeitem, bool keep_paths,
}
repr->setAttribute("inkscape:original-d", NULL);
path->setCurveBeforeLPE(NULL);
+ if (!(shape->getCurve()->get_segment_count())) {
+ repr->parent()->removeChild(repr);
+ }
} else {
if (!keep_paths) {
sp_lpe_item_update_patheffect(lpeitem, true, true);
@@ -530,17 +533,17 @@ void SPLPEItem::removeCurrentPathEffect(bool keep_paths)
if (Inkscape::LivePathEffect::Effect* effect_ = this->getCurrentLPE()) {
effect_->keep_paths = keep_paths;
effect_->doOnRemove(this);
- }
- PathEffectList new_list = *this->path_effect_list;
- new_list.remove(lperef); //current lpe ref is always our 'own' pointer from the path_effect_list
- this->getRepr()->setAttribute("inkscape:path-effect", patheffectlist_svg_string(new_list));
- if (!keep_paths) {
- // Make sure that ellipse is stored as <svg:circle> or <svg:ellipse> if possible.
- if( SP_IS_GENERICELLIPSE(this)) {
- SP_GENERICELLIPSE(this)->write( this->getRepr()->document(), this->getRepr(), SP_OBJECT_WRITE_EXT );
+ PathEffectList new_list = *this->path_effect_list;
+ new_list.remove(lperef); //current lpe ref is always our 'own' pointer from the path_effect_list
+ this->getRepr()->setAttribute("inkscape:path-effect", patheffectlist_svg_string(new_list));
+ if (!keep_paths) {
+ // Make sure that ellipse is stored as <svg:circle> or <svg:ellipse> if possible.
+ if( SP_IS_GENERICELLIPSE(this)) {
+ SP_GENERICELLIPSE(this)->write( this->getRepr()->document(), this->getRepr(), SP_OBJECT_WRITE_EXT );
+ }
}
+ sp_lpe_item_cleanup_original_path_recursive(this, keep_paths);
}
- sp_lpe_item_cleanup_original_path_recursive(this, keep_paths);
}
/**