From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/sp-star.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/sp-star.cpp') diff --git a/src/sp-star.cpp b/src/sp-star.cpp index 8a1956e3b..d112962a2 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -14,7 +14,7 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include @@ -28,8 +28,6 @@ #include "xml/repr.h" #include "document.h" -#include <2geom/pathvector.h> - #include "sp-star.h" SPStar::SPStar() : SPPolygon() , -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/sp-star.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sp-star.cpp') diff --git a/src/sp-star.cpp b/src/sp-star.cpp index d112962a2..8a1956e3b 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -14,7 +14,7 @@ */ #ifdef HAVE_CONFIG_H -#include +# include "config.h" #endif #include @@ -28,6 +28,8 @@ #include "xml/repr.h" #include "document.h" +#include <2geom/pathvector.h> + #include "sp-star.h" SPStar::SPStar() : SPPolygon() , -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/sp-star.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/sp-star.cpp') diff --git a/src/sp-star.cpp b/src/sp-star.cpp index 8a1956e3b..d112962a2 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -14,7 +14,7 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include @@ -28,8 +28,6 @@ #include "xml/repr.h" #include "document.h" -#include <2geom/pathvector.h> - #include "sp-star.h" SPStar::SPStar() : SPPolygon() , -- cgit v1.2.3 From 5151c0569bb266461c3b6a6325c0d4be60b41a67 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Mon, 29 May 2017 02:09:29 +0200 Subject: 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) --- src/sp-star.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/sp-star.cpp') 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 ); -- cgit v1.2.3