66 return ui.title->text(); |
66 return ui.title->text(); |
67 } |
67 } |
68 |
68 |
69 void NewPartDialog::fillHeader (LDDocument* newdoc) const |
69 void NewPartDialog::fillHeader (LDDocument* newdoc) const |
70 { |
70 { |
71 LDObjectList objs; |
71 newdoc->emplace<LDComment>(title()); |
72 objs << new LDComment (title()); |
72 newdoc->emplace<LDComment>("Name: <untitled>.dat"); |
73 objs << new LDComment ("Name: <untitled>.dat"); |
73 newdoc->emplace<LDComment>("Author: " + author()); |
74 objs << new LDComment ("Author: " + author()); |
74 newdoc->emplace<LDComment>("!LDRAW_ORG Unofficial_Part"); |
75 objs << new LDComment ("!LDRAW_ORG Unofficial_Part"); |
|
76 QString license = preferredLicenseText(); |
75 QString license = preferredLicenseText(); |
77 |
76 |
78 if (not license.isEmpty()) |
77 if (not license.isEmpty()) |
79 objs << new LDComment(license); |
78 newdoc->emplace<LDComment>(license); |
80 |
79 |
81 objs << new LDEmpty(); |
80 newdoc->emplace<LDEmpty>(); |
82 objs << new LDBfc (getWinding()); |
81 newdoc->emplace<LDBfc>(getWinding()); |
83 objs << new LDEmpty(); |
82 newdoc->emplace<LDEmpty>(); |
84 newdoc->addObjects (objs); |
|
85 } |
83 } |