summaryrefslogtreecommitdiffstats
path: root/src/sp-star.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-05-29 00:09:29 +0000
committerJabiertxof <jtx@jtx>2017-05-29 00:09:29 +0000
commit5151c0569bb266461c3b6a6325c0d4be60b41a67 (patch)
treec88082a30788888ff942b63e6c2cfadbf68ccf07 /src/sp-star.cpp
parentFix bug on crash if undefined LPE load (diff)
downloadinkscape-5151c0569bb266461c3b6a6325c0d4be60b41a67.tar.gz
inkscape-5151c0569bb266461c3b6a6325c0d4be60b41a67.zip
Fix bug #1694111 also fixes noumerous bugfixes on LPE undo. And shapes are improved to only perform path effet one time each
Fixed bugs: - https://launchpad.net/bugs/1694111 (bzr r15713)
Diffstat (limited to 'src/sp-star.cpp')
-rw-r--r--src/sp-star.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sp-star.cpp b/src/sp-star.cpp
index d112962a2..d7ee352c7 100644
--- a/src/sp-star.cpp
+++ b/src/sp-star.cpp
@@ -223,7 +223,7 @@ void SPStar::update(SPCtx *ctx, guint flags) {
}
void SPStar::update_patheffect(bool write) {
- this->set_shape();
+ this->set_shape(true);
if (write) {
Inkscape::XML::Node *repr = this->getRepr();
@@ -363,7 +363,7 @@ sp_star_get_curvepoint (SPStar *star, SPStarPoint point, gint index, bool previ)
#define NEXT false
#define PREV true
-void SPStar::set_shape() {
+void SPStar::set_shape(bool force) {
// perhaps we should convert all our shapes into LPEs without source path
// and with knotholders for parameters, then this situation will be handled automatically
// by disabling the entire stack (including the shape LPE)
@@ -446,6 +446,12 @@ void SPStar::set_shape() {
/* Reset the shape'scurve to the "original_curve"
* This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/
+ if(this->getCurveBeforeLPE()) {
+ if(!force && this->getCurveBeforeLPE()->get_pathvector() == c->get_pathvector()) {
+ c->unref();
+ return;
+ }
+ }
this->setCurveInsync( c, TRUE);
this->setCurveBeforeLPE( c );