Port changes from mainstream.

This commit is contained in:
Roman Telezhynskyi 2022-08-13 19:27:47 +03:00
parent 46b2814981
commit 5b9c1b1d55
2 changed files with 7 additions and 8 deletions

View file

@ -167,7 +167,7 @@ BAD_READ_BLOCKS, /*!< error in block read process. */
BAD_READ_ENTITIES, /*!< error in entities read process. */
BAD_READ_OBJECTS, /*!< error in objects read process. */
BAD_READ_SECTION, /*!< error in sections read process. */
BAD_CODE_PARSED, /*!< error in any parseCodes() method. */
BAD_CODE_PARSED, /*!< error in any parseCodes() method. */
};
enum class DebugLevel {

View file

@ -2494,7 +2494,6 @@ bool dxfRW::processViewport() {
if (!vp.parseCode(code, reader)) {
return setError( DRW::BAD_CODE_PARSED);
}
break;
}
return setError(DRW::BAD_READ_ENTITIES);
@ -2684,11 +2683,10 @@ bool dxfRW::processPolyline() {
nextentity = reader->getString();
DRW_DBG(nextentity); DRW_DBG("\n");
if (nextentity != "VERTEX") {
iface->addPolyline(pl);
return true; //found new entity or ENDSEC, terminate
} else {
processVertex(&pl);
iface->addPolyline(pl);
return true; //found new entity or ENDSEC, terminate
}
processVertex(&pl);
}
if (!pl.parseCode(code, reader)) { //parseCode just initialize the members of pl
@ -2710,8 +2708,9 @@ bool dxfRW::processVertex(DRW_Polyline *pl) {
nextentity = reader->getString();
DRW_DBG(nextentity); DRW_DBG("\n");
if (nextentity == "SEQEND") {
return true; //found SEQEND no more vertex, terminate
} else if (nextentity == "VERTEX"){
return true; //found SEQEND no more vertex, terminate
}
if (nextentity == "VERTEX"){
v.reset(new DRW_Vertex()); //another vertex
}
}