1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +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 files = QFileDialog::getOpenFileNames(this, tr("Open file"));
QStringList list = files; QStringList list = files;
QStringList::Iterator it = list.begin(); QString lastFile;
while(it != list.end()) { for (QStringList::Iterator it = list.begin(); it != list.end(); it++)
openFile(*it); if (openFile(*it))
++it; lastFile = *it;
}
if (!list.empty()) if (!lastFile.isEmpty())
setDir(list.back()); setDir(lastFile);
} }
bool GUI::openFile(const QString &fileName) bool GUI::openFile(const QString &fileName)