summaryrefslogtreecommitdiffstats
path: root/src/sp-spiral.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
commitd2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch)
treee2703384779e83312c456399999997fcc289c5cf /src/sp-spiral.cpp
parentMerge branch 'master' into powerpencil (diff)
parentchange assignment to equality (diff)
downloadinkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz
inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/sp-spiral.cpp')
-rw-r--r--src/sp-spiral.cpp27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp
index d75db3daa..a84fc6041 100644
--- a/src/sp-spiral.cpp
+++ b/src/sp-spiral.cpp
@@ -14,7 +14,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-
+#include "live_effects/effect.h"
#include "svg/svg.h"
#include "attributes.h"
#include <2geom/bezier-utils.h>
@@ -429,13 +429,25 @@ void SPSpiral::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape
*/
Geom::Affine SPSpiral::set_transform(Geom::Affine const &xform)
{
- // Only set transform with proportional scaling
- if (!xform.withoutTranslation().isUniformScale()) {
+ if (hasPathEffect() && pathEffectsEnabled() &&
+ (this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL) ||
+ this->hasPathEffectOfType(Inkscape::LivePathEffect::BEND_PATH) ||
+ this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_MANY) ||
+ this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_STROKES) ) )
+ {
+ // if path has this LPE applied, don't write the transform to the pathdata, but write it 'unoptimized'
+ // also if the effect is type BEND PATH to fix bug #179842
+ this->adjust_livepatheffect(xform);
+ this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG);
return xform;
}
-
- // Allow live effects
- if (hasPathEffect() && pathEffectsEnabled()) {
+ // Only set transform with proportional scaling
+ if (!xform.withoutTranslation().isUniformScale()) {
+ // Adjust livepatheffect
+ if (hasPathEffect() && pathEffectsEnabled()) {
+ this->adjust_livepatheffect(xform);
+ this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG);
+ }
return xform;
}
@@ -476,6 +488,9 @@ Geom::Affine SPSpiral::set_transform(Geom::Affine const &xform)
// Adjust gradient fill
this->adjust_gradient(xform * ret.inverse());
+ // Adjust livepatheffect
+ this->adjust_livepatheffect(xform);
+
this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG);
return ret;