diff --git a/src/object/sp-ellipse.cpp b/src/object/sp-ellipse.cpp index 129a52aaaf7b7fccfc3178323cfc54e9bbae869d..843f88010edb776ab16b43315a624c61567a8d88 100644 --- a/src/object/sp-ellipse.cpp +++ b/src/object/sp-ellipse.cpp @@ -55,7 +55,6 @@ void SPGenericEllipse::build(SPDocument *document, Inkscape::XML::Node *repr) { // std::cout << "SPGenericEllipse::build: Entrance: " << this->type // << " (" << g_quark_to_string(repr->code()) << ")" << std::endl; - switch ( type ) { case SP_GENERIC_ELLIPSE_ARC: this->readAttr(SPAttr::SODIPODI_CX); @@ -209,6 +208,24 @@ void SPGenericEllipse::update(SPCtx *ctx, guint flags) this->cy.update(em, ex, dy); this->rx.update(em, ex, dr); this->ry.update(em, ex, dr); + switch ( type ) { + case SP_GENERIC_ELLIPSE_CIRCLE: + if (this->getAttribute("rx")) { + this->setAttribute("r", this->getAttribute("rx")); + this->removeAttribute("rx"); + this->removeAttribute("ry"); + } + break; + case SP_GENERIC_ELLIPSE_ELLIPSE: + if (this->getAttribute("r")) { + this->setAttribute("rx",this->getAttribute("r")); + this->setAttribute("ry",this->getAttribute("r")); + this->removeAttribute("r"); + } + break; + default: + break; + } this->set_shape(); }