From 74796e3e41e6cebceadece2987cc9c12fa6bedd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 6 Dec 2020 23:31:45 +0100 Subject: [PATCH] Only trigger the last maploaded --- src/GUI/app.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/GUI/app.cpp b/src/GUI/app.cpp index 48b5e97f..f6bffa57 100644 --- a/src/GUI/app.cpp +++ b/src/GUI/app.cpp @@ -77,9 +77,11 @@ App::~App() int App::run() { + MapAction *lastReady = 0; + QStringList args(arguments()); + _gui->show(); - QStringList args(arguments()); for (int i = 1; i < args.count(); i++) { if (!_gui->openFile(args.at(i), true)) { MapAction *a; @@ -87,11 +89,14 @@ int App::run() _gui->openFile(args.at(i), false); else { if (a) - a->trigger(); + lastReady = a; } } } + if (lastReady) + lastReady->trigger(); + return exec(); }