From 095d4f748b06b8422cef62f1ca88d9a59b66a089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Wed, 23 Mar 2022 12:05:02 +0100 Subject: [PATCH] added message if trying to open ubx directly (linux + windows) --- src/core/UBApplication.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp index 479f07a1..b7d3e0c0 100644 --- a/src/core/UBApplication.cpp +++ b/src/core/UBApplication.cpp @@ -357,8 +357,13 @@ int UBApplication::exec(const QString& pFileToImport) applicationController->initScreenLayout(bUseMultiScreen); boardController->setupLayout(); - if (pFileToImport.length() > 0 && !pFileToImport.endsWith("ubx")) - UBApplication::applicationController->importFile(pFileToImport); + if (pFileToImport.length() > 0) + { + if (!pFileToImport.endsWith("ubx")) + applicationController->importFile(pFileToImport); + else + applicationController->showMessage(tr("Cannot open your UBX file directly. Please import it in Documents mode instead"), false); + } if (UBSettings::settings()->appStartMode->get().toInt()) applicationController->showDesktop();