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-rect.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/sp-rect.cpp') diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index 2ba9a7023..40107096f 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -12,12 +12,10 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif - #include "display/curve.h" -#include <2geom/rect.h> #include "inkscape.h" #include "document.h" @@ -25,7 +23,6 @@ #include "style.h" #include "sp-rect.h" #include -#include "xml/repr.h" #include "sp-guide.h" #include "preferences.h" -- cgit v1.2.3 From f273f14eb1b54861f1b3a7eb622cb481ee33cec9 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 26 Sep 2016 13:26:47 +0200 Subject: Fix undo/redo for mesh gradients. (bzr r15135) --- src/sp-rect.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/sp-rect.cpp') diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index 40107096f..88dad5354 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -28,6 +28,7 @@ #define noRECT_VERBOSE +//#define OBJECT_TRACE SPRect::SPRect() : SPShape() { } @@ -36,6 +37,10 @@ SPRect::~SPRect() { } void SPRect::build(SPDocument* doc, Inkscape::XML::Node* repr) { +#ifdef OBJECT_TRACE + objectTrace( "SPRect::build" ); +#endif + SPShape::build(doc, repr); this->readAttr("x"); @@ -44,9 +49,20 @@ void SPRect::build(SPDocument* doc, Inkscape::XML::Node* repr) { this->readAttr("height"); this->readAttr("rx"); this->readAttr("ry"); + +#ifdef OBJECT_TRACE + objectTrace( "SPRect::build", false ); +#endif } void SPRect::set(unsigned key, gchar const *value) { + +#ifdef OBJECT_TRACE + std::stringstream temp; + temp << "SPRect::set: " << key << " " << (value?value:"null"); + objectTrace( temp.str() ); +#endif + /* fixme: We need real error processing some time */ // We must update the SVGLengths immediately or nodes may be misplaced after they are moved. @@ -104,9 +120,17 @@ void SPRect::set(unsigned key, gchar const *value) { SPShape::set(key, value); break; } +#ifdef OBJECT_TRACE + objectTrace( "SPRect::set", false ); +#endif } void SPRect::update(SPCtx* ctx, unsigned int flags) { + +#ifdef OBJECT_TRACE + objectTrace( "SPRect::update", true, flags ); +#endif + if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { SPItemCtx const *ictx = reinterpret_cast(ctx); @@ -127,9 +151,17 @@ void SPRect::update(SPCtx* ctx, unsigned int flags) { } SPShape::update(ctx, flags); +#ifdef OBJECT_TRACE + objectTrace( "SPRect::update", false, flags ); +#endif } Inkscape::XML::Node * SPRect::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { + +#ifdef OBJECT_TRACE + objectTrace( "SPRect::write", true, flags ); +#endif + if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { repr = xml_doc->createElement("svg:rect"); } @@ -151,6 +183,10 @@ Inkscape::XML::Node * SPRect::write(Inkscape::XML::Document *xml_doc, Inkscape:: this->set_shape(); // evaluate SPCurve SPShape::write(xml_doc, repr, flags); +#ifdef OBJECT_TRACE + objectTrace( "SPRect::write", false, flags ); +#endif + return repr; } -- cgit v1.2.3