diff -r 8d22e1dd272d -r f2974f3ac1ab src/primitives.cpp --- a/src/primitives.cpp Fri Mar 23 17:14:46 2018 +0200 +++ b/src/primitives.cpp Fri Mar 23 19:30:53 2018 +0200 @@ -486,14 +486,21 @@ document->setFrozen(false); document->history()->setIgnoring(false); - document->emplace(description); - document->emplace(format("Name: %1", fileName)); - document->emplace(format("Author: %1", author)); - document->emplace(format("!LDRAW_ORG Unofficial_%1Primitive", hires ? "48_" : "")); - document->emplace(license); - document->emplace(); - document->emplace(BfcStatement::CertifyCCW); - document->emplace(); + document->header.name = fileName; + document->header.description = description; + document->header.author = author; + + if (hires) + document->header.type = LDHeader::Primitive_48; + else + document->header.type = LDHeader::Primitive_8; + + if (::config->useCaLicense()) + document->header.license = LDHeader::CaLicense; + else + document->header.license =LDHeader::UnspecifiedLicense; + + document->setWinding(CounterClockwise); spec.generateBody(*document); document->addHistoryStep(); return document;