rendering problem with metadata on text elements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Undecided
|
sas |
Bug Description
This applies both to ordinary text and to flowed text.
Current behaviour:
If a text object has a 'title', 'desc' or 'metadata' child element, that child element is rendered as part of the text in the image.
Expected behaviour:
'title', 'desc' and 'metadata' elements shouldn't be rendered, as they just provide metadata for the parent element (see section 5.4 and chapter 21 of the SVG specification).
To reproduce:
1) Add some text.
2) Give it a title (right click on it, select Object Properties, type in a title, click Set).
3) Notice that the title appears in the image.
If you check with the XML editor, you will see that the title has been added correctly. So this is a rendering problem rather than a misfunctioning of the Object Properties dialog.
The following simple patch corrects the text showing up initially. However there is at least one case that is still not covered:
1) Type some text in
2) Right-click, Object Properties and add a Title
3) Edit the text and include a line-break
4) Press backspace to remove the line-break
Upon performing #4, the title and desc element text contents are prepended to the visible text (in fact, the title and desc elements have been eliminated and the text contents placed as children of the parent text element). I've started looking at src/text- editing. cpp but have not debugged this problem yet.