diff -r 6dac2d52bd9a -r 47cde4087cc5 src/dialogs/newpartdialog.cpp --- a/src/dialogs/newpartdialog.cpp Sun Jan 29 21:07:15 2017 +0200 +++ b/src/dialogs/newpartdialog.cpp Sun Jan 29 21:17:43 2017 +0200 @@ -68,18 +68,16 @@ void NewPartDialog::fillHeader (LDDocument* newdoc) const { - LDObjectList objs; - objs << new LDComment (title()); - objs << new LDComment ("Name: .dat"); - objs << new LDComment ("Author: " + author()); - objs << new LDComment ("!LDRAW_ORG Unofficial_Part"); + newdoc->emplace(title()); + newdoc->emplace("Name: .dat"); + newdoc->emplace("Author: " + author()); + newdoc->emplace("!LDRAW_ORG Unofficial_Part"); QString license = preferredLicenseText(); if (not license.isEmpty()) - objs << new LDComment(license); + newdoc->emplace(license); - objs << new LDEmpty(); - objs << new LDBfc (getWinding()); - objs << new LDEmpty(); - newdoc->addObjects (objs); + newdoc->emplace(); + newdoc->emplace(getWinding()); + newdoc->emplace(); }