Skip to content
Browse files

correct layer initilize

  • Loading branch information...
1 parent f939e63 commit 9d7e7f609f213cc12280c595cd3c35e8114d6fb8 @Rallaz Rallaz committed
View
4 libraries/libdxfrw/src/drw_objects.h
@@ -212,7 +212,9 @@ class DRW_LType : public DRW_TableEntry {
*/
class DRW_Layer : public DRW_TableEntry {
public:
- DRW_Layer() {
+ DRW_Layer() { reset();}
+
+ void reset() {
tType = DRW::LAYER;
lineType = "CONTINUOUS";
color = 7; // default BYLAYER (256)
View
1 libraries/libdxfrw/src/libdxfrw.cpp
@@ -1885,6 +1885,7 @@ bool dxfRW::processLayer() {
DBG(sectionstr); DBG("\n");
if (sectionstr == "LAYER") {
reading = true;
+ layer.reset();
} else if (sectionstr == "ENDTAB") {
return true; //found ENDTAB terminate
}
View
1 librecad/src/lib/filters/rs_filterdxfrw.cpp
@@ -1605,6 +1605,7 @@ void RS_FilterDXFRW::writeLayers(){
DRW_Layer lay;
RS_LayerList* ll = graphic->getLayerList();
for (unsigned int i = 0; i < ll->count(); i++) {
+ lay.reset();
RS_Layer* l = ll->at(i);
RS_Pen pen = l->getPen();
lay.name = l->getName().toUtf8().data();

0 comments on commit 9d7e7f6

Please sign in to comment.
Something went wrong with that request. Please try again.