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:
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 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user