summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2018-10-02 21:59:03 +0000
committerJabiertxof <jabier.arraiza@marker.es>2018-10-02 21:59:03 +0000
commit9718987b63ead60f6fd135768eb72f83c999ee4e (patch)
tree84964f75632bf2de01101a4c7c3c618007496037 /src
parentCMake: Allow to build with GraphicsMagick instead of ImageMagick (diff)
downloadinkscape-9718987b63ead60f6fd135768eb72f83c999ee4e.tar.gz
inkscape-9718987b63ead60f6fd135768eb72f83c999ee4e.zip
Fixes for LPE transforms and a bug when closing inkscape, related to lpeobject-reference
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpeobject-reference.cpp5
-rw-r--r--src/object/sp-ellipse.cpp5
-rw-r--r--src/object/sp-item.cpp6
-rw-r--r--src/object/sp-path.cpp5
-rw-r--r--src/object/sp-spiral.cpp5
-rw-r--r--src/object/sp-star.cpp5
6 files changed, 7 insertions, 24 deletions
diff --git a/src/live_effects/lpeobject-reference.cpp b/src/live_effects/lpeobject-reference.cpp
index f8d4e08f5..6b04b4c67 100644
--- a/src/live_effects/lpeobject-reference.cpp
+++ b/src/live_effects/lpeobject-reference.cpp
@@ -114,8 +114,9 @@ lpeobjectreference_href_changed(SPObject */*old_ref*/, SPObject */*ref*/, LPEObj
if ( refobj ) {
lpeobjref->start_listening(refobj);
}
-
- lpeobjref->owner->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
+ if (lpeobjref->owner) {
+ lpeobjref->owner->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
+ }
}
static void
diff --git a/src/object/sp-ellipse.cpp b/src/object/sp-ellipse.cpp
index 08be94f6f..aa8853ec6 100644
--- a/src/object/sp-ellipse.cpp
+++ b/src/object/sp-ellipse.cpp
@@ -502,10 +502,7 @@ void SPGenericEllipse::set_shape()
Geom::Affine SPGenericEllipse::set_transform(Geom::Affine const &xform)
{
- if (hasPathEffect() && pathEffectsEnabled())
- {
- // Inverse it to compensate
- this->adjust_livepatheffect(xform.inverse());
+ if (hasPathEffect() && pathEffectsEnabled()) {
return xform;
}
diff --git a/src/object/sp-item.cpp b/src/object/sp-item.cpp
index c09116e97..d5c02709e 100644
--- a/src/object/sp-item.cpp
+++ b/src/object/sp-item.cpp
@@ -1509,16 +1509,10 @@ void SPItem::doWriteTransform(Geom::Affine const &transform, Geom::Affine const
)
{
transform_attr = this->set_transform(transform);
- if (lpeitem && lpeitem->hasPathEffectRecursive()) {
- lpeitem->adjust_livepatheffect(transform_attr);
- }
if (freeze_stroke_width) {
freeze_stroke_width_recursive(false);
}
} else {
- if (!preserve && lpeitem && lpeitem->hasPathEffectRecursive()) {
- lpeitem->adjust_livepatheffect(transform_attr);
- }
if (freeze_stroke_width) {
freeze_stroke_width_recursive(false);
if (compensate) {
diff --git a/src/object/sp-path.cpp b/src/object/sp-path.cpp
index 189f8c2c6..10f7930c0 100644
--- a/src/object/sp-path.cpp
+++ b/src/object/sp-path.cpp
@@ -322,10 +322,7 @@ Geom::Affine SPPath::set_transform(Geom::Affine const &transform) {
if (!_curve) { // 0 nodes, nothing to transform
return Geom::identity();
}
- if (hasPathEffect() && pathEffectsEnabled())
- {
- // Inverse it to compensate
- this->adjust_livepatheffect(transform.inverse());
+ if (hasPathEffect() && pathEffectsEnabled()) {
return transform;
}
diff --git a/src/object/sp-spiral.cpp b/src/object/sp-spiral.cpp
index 83455dbe4..b7a92e47e 100644
--- a/src/object/sp-spiral.cpp
+++ b/src/object/sp-spiral.cpp
@@ -408,10 +408,7 @@ void SPSpiral::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape
*/
Geom::Affine SPSpiral::set_transform(Geom::Affine const &xform)
{
- if (hasPathEffect() && pathEffectsEnabled())
- {
- // Inverse it to compensate
- this->adjust_livepatheffect(xform.inverse());
+ if (hasPathEffect() && pathEffectsEnabled()) {
return xform;
}
// Only set transform with proportional scaling
diff --git a/src/object/sp-star.cpp b/src/object/sp-star.cpp
index 26a1b69bc..20c9607b1 100644
--- a/src/object/sp-star.cpp
+++ b/src/object/sp-star.cpp
@@ -490,10 +490,7 @@ void SPStar::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::
Geom::Affine SPStar::set_transform(Geom::Affine const &xform)
{
bool opt_trans = (randomized == 0);
- if (hasPathEffect() && pathEffectsEnabled())
- {
- // Inverse it to compensate
- this->adjust_livepatheffect(xform.inverse());
+ if (hasPathEffect() && pathEffectsEnabled()) {
return xform;
}
// Only set transform with proportional scaling