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

Only trigger the last maploaded

This commit is contained in:
Martin Tůma 2020-12-06 23:31:45 +01:00
parent 10e1b5c4fb
commit 74796e3e41

View File

@ -77,9 +77,11 @@ App::~App()
int App::run() int App::run()
{ {
MapAction *lastReady = 0;
QStringList args(arguments());
_gui->show(); _gui->show();
QStringList args(arguments());
for (int i = 1; i < args.count(); i++) { for (int i = 1; i < args.count(); i++) {
if (!_gui->openFile(args.at(i), true)) { if (!_gui->openFile(args.at(i), true)) {
MapAction *a; MapAction *a;
@ -87,11 +89,14 @@ int App::run()
_gui->openFile(args.at(i), false); _gui->openFile(args.at(i), false);
else { else {
if (a) if (a)
a->trigger(); lastReady = a;
} }
} }
} }
if (lastReady)
lastReady->trigger();
return exec(); return exec();
} }