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-path.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index c4d24c503..a7119dd31 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -16,7 +16,7 @@ */ #ifdef HAVE_CONFIG_H -# include +#include #endif #include @@ -27,7 +27,6 @@ #include "sp-lpe-item.h" #include "display/curve.h" -#include <2geom/pathvector.h> #include <2geom/curves.h> #include "helper/geom-curves.h" @@ -46,7 +45,6 @@ #include "inkscape.h" #include "style.h" #include "message-stack.h" -#include "selection.h" #define noPATH_VERBOSE -- 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-path.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index a7119dd31..c4d24c503 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -16,7 +16,7 @@ */ #ifdef HAVE_CONFIG_H -#include +# include #endif #include @@ -27,6 +27,7 @@ #include "sp-lpe-item.h" #include "display/curve.h" +#include <2geom/pathvector.h> #include <2geom/curves.h> #include "helper/geom-curves.h" @@ -45,6 +46,7 @@ #include "inkscape.h" #include "style.h" #include "message-stack.h" +#include "selection.h" #define noPATH_VERBOSE -- 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-path.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index c4d24c503..a7119dd31 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -16,7 +16,7 @@ */ #ifdef HAVE_CONFIG_H -# include +#include #endif #include @@ -27,7 +27,6 @@ #include "sp-lpe-item.h" #include "display/curve.h" -#include <2geom/pathvector.h> #include <2geom/curves.h> #include "helper/geom-curves.h" @@ -46,7 +45,6 @@ #include "inkscape.h" #include "style.h" #include "message-stack.h" -#include "selection.h" #define noPATH_VERBOSE -- cgit v1.2.3 From f799b5d6e8278c76326a6fec8da0e017eac342ec Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Tue, 6 Dec 2016 21:41:55 +0100 Subject: Fixes for measure LPE and speed path based LPE operations (bzr r15302) --- src/sp-path.cpp | 62 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index a7119dd31..b593b7937 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -187,35 +187,35 @@ void SPPath::release() { void SPPath::set(unsigned int key, const gchar* value) { switch (key) { case SP_ATTR_INKSCAPE_ORIGINAL_D: - if (value) { - Geom::PathVector pv = sp_svg_read_pathv(value); - SPCurve *curve = new SPCurve(pv); - - if (curve) { - this->set_original_curve(curve, TRUE, true); - curve->unref(); - } - } else { - this->set_original_curve(NULL, TRUE, true); - } - - this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); + if (value) { + Geom::PathVector pv = sp_svg_read_pathv(value); + SPCurve *curve = new SPCurve(pv); + + if (curve) { + this->set_original_curve(curve, TRUE, true); + curve->unref(); + } + } else { + this->set_original_curve(NULL, TRUE, true); + } + + this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; case SP_ATTR_D: - if (value) { - Geom::PathVector pv = sp_svg_read_pathv(value); - SPCurve *curve = new SPCurve(pv); - - if (curve) { - this->setCurve(curve, TRUE); - curve->unref(); - } - } else { - this->setCurve(NULL, TRUE); - } - - this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); + if (value) { + Geom::PathVector pv = sp_svg_read_pathv(value); + SPCurve *curve = new SPCurve(pv); + + if (curve) { + this->setCurve(curve, TRUE); + curve->unref(); + } + } else { + this->setCurve(NULL, TRUE); + } + + this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; case SP_PROP_MARKER: @@ -276,13 +276,13 @@ g_message("sp_path_write writes 'd' attribute"); } void SPPath::update(SPCtx *ctx, guint flags) { - if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { - flags &= ~SP_OBJECT_USER_MODIFIED_FLAG_B; // since we change the description, it's not a "just translation" anymore - } + if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { + flags &= ~SP_OBJECT_USER_MODIFIED_FLAG_B; // since we change the description, it's not a "just translation" anymore + } - SPShape::update(ctx, flags); + SPShape::update(ctx, flags); - this->connEndPair.update(); + this->connEndPair.update(); } Geom::Affine SPPath::set_transform(Geom::Affine const &transform) { -- cgit v1.2.3