611 |
611 |
612 // Prepend "Hi-Res" if 48/ primitive. |
612 // Prepend "Hi-Res" if 48/ primitive. |
613 if (divs == HighResolution) |
613 if (divs == HighResolution) |
614 descr.insert (0, "Hi-Res "); |
614 descr.insert (0, "Hi-Res "); |
615 |
615 |
616 LDDocument* f = LDDocument::createNew(); |
616 LDDocument* document = g_win->newDocument(); |
617 f->setDefaultName (name); |
617 document->setDefaultName (name); |
618 |
618 |
619 QString author = APPNAME; |
619 QString author = APPNAME; |
620 QString license = ""; |
620 QString license = ""; |
621 |
621 |
622 if (not g_win->configBag()->defaultName().isEmpty()) |
622 if (not g_win->configBag()->defaultName().isEmpty()) |
635 << LDSpawn<LDComment> (license) |
635 << LDSpawn<LDComment> (license) |
636 << LDSpawn<LDEmpty>() |
636 << LDSpawn<LDEmpty>() |
637 << LDSpawn<LDBFC> (BFCStatement::CertifyCCW) |
637 << LDSpawn<LDBFC> (BFCStatement::CertifyCCW) |
638 << LDSpawn<LDEmpty>(); |
638 << LDSpawn<LDEmpty>(); |
639 |
639 |
640 f->setImplicit (false); |
640 document->setImplicit (false); |
641 f->history()->setIgnoring (false); |
641 document->history()->setIgnoring (false); |
642 f->addObjects (objs); |
642 document->addObjects (objs); |
643 f->addObjects (MakePrimitive (type, segs, divs, num)); |
643 document->addObjects (MakePrimitive (type, segs, divs, num)); |
644 f->addHistoryStep(); |
644 document->addHistoryStep(); |
645 return f; |
645 return document; |
646 } |
646 } |
647 |
647 |
648 // ============================================================================= |
648 // ============================================================================= |
649 // |
649 // |
650 LDDocument* GetPrimitive (PrimitiveType type, int segs, int divs, int num) |
650 LDDocument* GetPrimitive (PrimitiveType type, int segs, int divs, int num) |