mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-03 16:25:54 +08:00
Warning if there is no XP-directory
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
#include <QStackedWidget>
|
#include <QStackedWidget>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
using namespace BlackConfig;
|
using namespace BlackConfig;
|
||||||
using namespace BlackGui;
|
using namespace BlackGui;
|
||||||
@@ -163,6 +164,14 @@ void SwiftGuiStd::initMenus()
|
|||||||
void SwiftGuiStd::copyXSwiftBusDialog(bool checkFileTimestamp)
|
void SwiftGuiStd::copyXSwiftBusDialog(bool checkFileTimestamp)
|
||||||
{
|
{
|
||||||
const QString xPlaneRootDir = ui->comp_MainInfoArea->getSettingsComponent()->getSimulatorSettings(CSimulatorInfo::XPLANE).getSimulatorDirectoryOrDefault();
|
const QString xPlaneRootDir = ui->comp_MainInfoArea->getSettingsComponent()->getSimulatorSettings(CSimulatorInfo::XPLANE).getSimulatorDirectoryOrDefault();
|
||||||
|
const QDir xpDir(xPlaneRootDir);
|
||||||
|
if (!xpDir.exists())
|
||||||
|
{
|
||||||
|
if (checkFileTimestamp) { return; }
|
||||||
|
QMessageBox::warning(this, tr("Copy XSwiftBus"), tr("XPlane directory does not exists!"), QMessageBox::Close);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const int c = CCopyXSwiftBusDialog::displayDialogAndCopyBuildFiles(xPlaneRootDir, checkFileTimestamp, this);
|
const int c = CCopyXSwiftBusDialog::displayDialogAndCopyBuildFiles(xPlaneRootDir, checkFileTimestamp, this);
|
||||||
if (c > 0) { CLogMessage(this).info("Copied %1 files from build directory") << c; }
|
if (c > 0) { CLogMessage(this).info("Copied %1 files from build directory") << c; }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user