src/toolsets/algorithmtoolset.cpp

changeset 979
880d3fe9ac7c
parent 978
4603d8fd063e
child 981
5d5d84ab2c48
equal deleted inserted replaced
978:4603d8fd063e 979:880d3fe9ac7c
534 for (LDObject* obj : selectedObjects()) 534 for (LDObject* obj : selectedObjects())
535 code << obj->asText(); 535 code << obj->asText();
536 536
537 // Create the new subfile document 537 // Create the new subfile document
538 LDDocument* doc = m_window->newDocument(); 538 LDDocument* doc = m_window->newDocument();
539 doc->setImplicit (false); 539 doc->openForEditing();
540 doc->setFullPath (fullsubname); 540 doc->setFullPath (fullsubname);
541 doc->setName (LDDocument::shortenName (fullsubname)); 541 doc->setName (LDDocument::shortenName (fullsubname));
542 542
543 LDObjectList objs; 543 LDObjectList objs;
544 objs << LDSpawn<LDComment> (subtitle); 544 objs << LDSpawn<LDComment> (subtitle);
583 m_window->doFullRefresh(); 583 m_window->doFullRefresh();
584 } 584 }
585 else 585 else
586 { 586 {
587 // Failed to save. 587 // Failed to save.
588 doc->dismiss(); 588 doc->close();
589 } 589 }
590 } 590 }

mercurial