FS#2263dwg2svg -min-lineweight option parsing broken
- Type
- Bug
- Status
- Closed
- Resolution
- Fixed
- Category
- QCAD (main)
- Severity
- Very Low
- Priority
- Low
- Reported version
- 3.26.4
- Operating system
- All
- Reported
- 2021-07-23 by felixbuenemann
- Closed
- 2021-07-23 by andrew
The parsing for the -min-lineweight option of dwg2svg is broken, only -w or the undocumented -minlineweight options work.
This is due to a typo in the Dwg2Svg.js script around line 225:
properties["minLineweight"] = getArgument(args, "-w", "-min-lineweight");
if (isNull(properties["minlineweight"])) {
properties["minLineweight"] = getArgument(args, "-w", "-minlineweight");
}
This should be:
properties["minLineweight"] = getArgument(args, "-w", "-min-lineweight");
if (isNull(properties["minLineweight"])) {
properties["minLineweight"] = getArgument(args, "-w", "-minlineweight");
}
Note the case minlineweight vs minLineweight.
This has the consequence that the value parsed form -min-lineweight is always replaced with the value from -minlineweight, which is usually undefined.
Since the short option -w is parsed in both cases, it is not affected from the bug.