diff --git a/src/object/sp-ellipse.cpp b/src/object/sp-ellipse.cpp index 1db7c0ecd486fb68292d42e588a82c975c57bc3a..8e620b3e5925beb1615cfcd4f789e1094dadcb3b 100644 --- a/src/object/sp-ellipse.cpp +++ b/src/object/sp-ellipse.cpp @@ -227,6 +227,7 @@ void SPGenericEllipse::update(SPCtx *ctx, guint flags) this->ry.update(em, ex, dr); this->set_shape(); + curve_set = true; } SPShape::update(ctx, flags); @@ -607,9 +608,10 @@ void SPGenericEllipse::snappoints(std::vector &p, void SPGenericEllipse::modified(guint flags) { - if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { + if (!curve_set && flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { this->set_shape(); } + curve_set = false; SPShape::modified(flags); } diff --git a/src/object/sp-ellipse.h b/src/object/sp-ellipse.h index 192ee03fc8cd1a9cc9cf7d68cf5133d706f9fdab..c8db5ea366ccb74bce448a26ce1f05672021da2c 100644 --- a/src/object/sp-ellipse.h +++ b/src/object/sp-ellipse.h @@ -95,6 +95,7 @@ protected: /** * @brief Determines whether the shape is a part of an ellipse. */ + mutable bool curve_set = false; bool _isSlice() const; }; diff --git a/src/object/sp-rect.cpp b/src/object/sp-rect.cpp index def363af991feaf73f1f7495b848126e657be7b1..06dc271f8b43423a2bd9aa7b9b8f9dc09a8752e3 100644 --- a/src/object/sp-rect.cpp +++ b/src/object/sp-rect.cpp @@ -163,7 +163,7 @@ void SPRect::update(SPCtx* ctx, unsigned int flags) { this->rx.update(em, ex, w); this->ry.update(em, ex, h); this->set_shape(); - + curve_set = true; flags &= ~SP_OBJECT_USER_MODIFIED_FLAG_B; // since we change the description, it's not a "just translation" anymore } @@ -340,9 +340,10 @@ bool SPRect::set_rect_path_attribute(Inkscape::XML::Node *repr) void SPRect::modified(guint flags) { - if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { + if (!curve_set && flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { this->set_shape(); } + curve_set = false; SPShape::modified(flags); } diff --git a/src/object/sp-rect.h b/src/object/sp-rect.h index f157e81e10cd8f873f3da83f180187fa88ad91fd..cb86e823523d60033da4af887e625cf21f14e703 100644 --- a/src/object/sp-rect.h +++ b/src/object/sp-rect.h @@ -81,6 +81,7 @@ public: SVGLength ry; private: + mutable bool curve_set = false; static double vectorStretch(Geom::Point p0, Geom::Point p1, Geom::Affine xform); };