Commit f84dbc6f authored by Pierre Kraemer's avatar Pierre Kraemer

allow multiple file import at once

parent c990b7f8
......@@ -56,8 +56,12 @@ MapHandlerGen* ImportSurfacePlugin::importFromFile(const QString& fileName)
void ImportSurfacePlugin::importFromFileDialog()
{
QString fileName = QFileDialog::getOpenFileName(m_window, "Import file", m_window->getAppPath(), "Mesh Files (*.ply *.off *.trian)");
importFromFile(fileName);
QStringList fileNames = QFileDialog::getOpenFileNames(m_window, "Import surfaces", m_window->getAppPath(), "Surface mesh Files (*.ply *.off *.trian)");
QStringList::Iterator it = fileNames.begin();
while(it != fileNames.end()) {
importFromFile(*it);
++it;
}
}
#ifndef DEBUG
......
......@@ -56,8 +56,12 @@ MapHandlerGen* ImportVolumePlugin::importFromFile(const QString& fileName)
void ImportVolumePlugin::importFromFileDialog()
{
QString fileName = QFileDialog::getOpenFileName(m_window, "Import file", m_window->getAppPath(), "Mesh Files (*.node *.ts *.off *.tet)");
importFromFile(fileName);
QStringList fileNames = QFileDialog::getOpenFileNames(m_window, "Import volumes", m_window->getAppPath(), "Volume mesh Files (*.node *.ts *.off *.tet)");
QStringList::Iterator it = fileNames.begin();
while(it != fileNames.end()) {
importFromFile(*it);
++it;
}
}
#ifndef DEBUG
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment