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:
parent
de787a97fa
commit
5131a9d81d
13
src/gui.cpp
13
src/gui.cpp
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user