Skip to content
Snippets Groups Projects
Commit 9baafc57 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

ProjectDocument: read j/r models

parent 163f4b03
No related branches found
No related tags found
1 merge request!1355GUI: remove ApplicationModels class
......@@ -353,11 +353,8 @@ ProjectDocument::ReadResult ProjectDocument::readProject(QIODevice* device,
while (r.readNextStartElement()) {
QString tag = r.name().toString();
if (tag == Tag::DocumentInfo) {
r.skipCurrentElement();
// simulation options
} else if (tag == Tag::SimulationOptions) {
// simulation options
if (tag == Tag::SimulationOptions) {
m_simulationOptionsItem.readFrom(&r);
XML::gotoEndElementOfTag(&r, tag);
......@@ -371,12 +368,23 @@ ProjectDocument::ReadResult ProjectDocument::readProject(QIODevice* device,
m_sampleModel.readFrom(&r);
XML::gotoEndElementOfTag(&r, tag);
// job model and real model
// real model
} else if (tag == Tag::RealModel) {
m_realDataModel.readFromProject(&r, projectDir, &messageService);
XML::gotoEndElementOfTag(&r, tag);
// job model
} else if (tag == Tag::JobModel) {
m_jobModel.readFromProject(&r, projectDir, &messageService);
XML::gotoEndElementOfTag(&r, tag);
// active view
} else if (tag == Tag::ActiveView) {
XML::readAttribute(&r, XML::Attrib::value, &m_lastViewActive);
XML::gotoEndElementOfTag(&r, tag);
} else
m_applicationModels.readFrom(&r, projectDir, &messageService);
r.skipCurrentElement();
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment