1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Fixed file open logic

This commit is contained in:
Martin Tůma 2015-10-07 01:30:03 +02:00
parent de787a97fa
commit 5131a9d81d

View File

@ -194,15 +194,14 @@ void GUI::openFile()
{
QStringList files = QFileDialog::getOpenFileNames(this, tr("Open file"));
QStringList list = files;
QStringList::Iterator it = list.begin();
QString lastFile;
while(it != list.end()) {
openFile(*it);
++it;
}
for (QStringList::Iterator it = list.begin(); it != list.end(); it++)
if (openFile(*it))
lastFile = *it;
if (!list.empty())
setDir(list.back());
if (!lastFile.isEmpty())
setDir(lastFile);
}
bool GUI::openFile(const QString &fileName)