From 11049d1bf9ce51e5e924e8c140f719849208e094 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 30 Sep 2019 17:20:39 +0200 Subject: Don't create empty text node when reading in "textPath". Fix for https://gitlab.com/inkscape/inbox/issues/512 --- src/object/sp-tspan.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/object') diff --git a/src/object/sp-tspan.cpp b/src/object/sp-tspan.cpp index 5ae889b9d..cee3f7d37 100644 --- a/src/object/sp-tspan.cpp +++ b/src/object/sp-tspan.cpp @@ -247,22 +247,6 @@ void SPTextPath::build(SPDocument *doc, Inkscape::XML::Node *repr) { this->readAttr( "side" ); this->readAttr( "xlink:href" ); - bool no_content = true; - - for (Inkscape::XML::Node* rch = repr->firstChild() ; rch != nullptr; rch = rch->next()) { - if ( rch->type() == Inkscape::XML::TEXT_NODE ) - { - no_content = false; - break; - } - } - - if ( no_content ) { - Inkscape::XML::Document *xml_doc = doc->getReprDoc(); - Inkscape::XML::Node* rch = xml_doc->createTextNode(""); - repr->addChild(rch, nullptr); - } - SPItem::build(doc, repr); } -- cgit v1.2.3