Work on project file reading

This commit is contained in:
Jack Andersen
2018-07-15 21:41:15 -10:00
parent 26cfa07f77
commit 7a38fd0676
16 changed files with 1108 additions and 351 deletions

View File

@@ -225,10 +225,10 @@ void MainWindow::importAction()
{
auto data = amuse::ContainerRegistry::LoadContainer(QStringToSysString(dir.filePath(fPath)).c_str());
for (auto& p : data)
if (!m_projectModel->importGroupData(SysStringToQString(p.first), std::move(p.second),
ProjectModel::ImportMode(impMode)))
if (!m_projectModel->importGroupData(SysStringToQString(p.first), std::move(p.second)))
return;
}
m_projectModel->extractSamples(ProjectModel::ImportMode(impMode), this);
m_projectModel->saveToFile(this);
return;
}
@@ -254,10 +254,10 @@ void MainWindow::importAction()
/* Handle single container */
auto data = amuse::ContainerRegistry::LoadContainer(QStringToSysString(path).c_str());
for (auto& p : data)
if (!m_projectModel->importGroupData(SysStringToQString(p.first), std::move(p.second),
ProjectModel::ImportMode(impMode)))
if (!m_projectModel->importGroupData(SysStringToQString(p.first), std::move(p.second)))
return;
m_projectModel->extractSamples(ProjectModel::ImportMode(impMode), this);
m_projectModel->saveToFile(this);
}