FS#90SVG Export group nesting
- Type
- Bug
- Status
- Closed
- Resolution
- Implemented
- Category
- QCAD (main)
- Severity
- Low
- Priority
- Low
- Reported version
- 3 TP1
- Operating system
- All
- Reported
- 2011-05-23 by anonymous
- Closed
- 2011-05-23 by deleted user
The SvgExporter opens a "group" for some entities, but never closes that group. The resulting nesting can get quite deep and does not conform to the original. I tentatively patched the script as below:
--- SvgExporter.js-orig 2011-05-23 10:55:17.239998578 +0200
+++ SvgExporter.js 2011-05-23 10:55:17.239998578 +0200
@@ -226,6 +226,11 @@
// RFileExporterAdapter.prototype.exportEntity.call(this, this.realEntity
// .data(), false);
// }
+
+ // dimensions and block references are grouped, close the group tag here
+ if (isDimension(entity) || isBlockReferenceEntity(entity)) {
+ this.writeEndElement();
+ }
};
SvgExporter.prototype.endEntity = function() {
There might be a better way, but that is what I came up with on short notice.