src/toolsets/filetoolset.cpp

changeset 1288
d1e45f90654b
parent 1269
ec691d9472b3
child 1308
dcc8c02530c2
equal deleted inserted replaced
1287:f1da43b7f5c6 1288:d1e45f90654b
20 #include <QMessageBox> 20 #include <QMessageBox>
21 #include "../canvas.h" 21 #include "../canvas.h"
22 #include "../lddocument.h" 22 #include "../lddocument.h"
23 #include "../mainwindow.h" 23 #include "../mainwindow.h"
24 #include "../partdownloader.h" 24 #include "../partdownloader.h"
25 #include "../parser.h"
25 #include "../primitives.h" 26 #include "../primitives.h"
26 #include "../dialogs/configdialog.h" 27 #include "../dialogs/configdialog.h"
27 #include "../dialogs/ldrawpathdialog.h" 28 #include "../dialogs/ldrawpathdialog.h"
28 #include "../dialogs/newpartdialog.h" 29 #include "../dialogs/newpartdialog.h"
29 #include "../dialogs/generateprimitivedialog.h" 30 #include "../dialogs/generateprimitivedialog.h"
115 QFile file = {filePath}; 116 QFile file = {filePath};
116 117
117 if (file.open(QIODevice::ReadOnly)) 118 if (file.open(QIODevice::ReadOnly))
118 { 119 {
119 Model model {m_documents}; 120 Model model {m_documents};
120 m_documents->loadFileContents(&file, model, nullptr, nullptr); 121 Parser parser {file};
122 parser.parseBody(model);
121 123
122 mainWindow()->clearSelection(); 124 mainWindow()->clearSelection();
123 125
124 for (LDObject* object : model.objects()) 126 for (LDObject* object : model.objects())
125 { 127 {

mercurial