From b6875ce1916a57c9e13cfc0b8fd63fa522b1e449 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 17 Jan 2017 17:03:42 +0100 Subject: Actually unsets attribute instead of ignoring it when it's 0 Fixed bugs: - https://launchpad.net/bugs/481805 (bzr r15420) --- src/sp-rect.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/sp-rect.cpp') diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index 88dad5354..e69cdfc7b 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -120,6 +120,7 @@ void SPRect::set(unsigned key, gchar const *value) { SPShape::set(key, value); break; } + updateRepr(); #ifdef OBJECT_TRACE objectTrace( "SPRect::set", false ); #endif @@ -171,10 +172,14 @@ Inkscape::XML::Node * SPRect::write(Inkscape::XML::Document *xml_doc, Inkscape:: if (this->rx._set) { sp_repr_set_svg_length(repr, "rx", this->rx); + } else { + repr->setAttribute("rx", NULL); } if (this->ry._set) { sp_repr_set_svg_length(repr, "ry", this->ry); + } else { + repr->setAttribute("ry", NULL); } sp_repr_set_svg_length(repr, "x", this->x); -- cgit v1.2.3