From 81050f557c9ca4e88880d62f2d7ff60964270a69 Mon Sep 17 00:00:00 2001 From: m_thread Date: Sun, 29 Mar 2015 10:51:03 +0200 Subject: [PATCH] Uncrustify --- .../plugins/setupwizard/vehicletemplateexportdialog.cpp | 8 +++++--- .../plugins/setupwizard/vehicletemplateselectorwidget.cpp | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp index 21b029526..12cc625bb 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp @@ -274,8 +274,9 @@ QString VehicleTemplateExportDialog::fixFilenameString(QString input, int trunca void VehicleTemplateExportDialog::exportTemplate() { QString path = QString("%1%2%3%4").arg(Utils::PathUtils().InsertStoragePath("%%STOREPATH%%cloudconfig")) - .arg(QDir::separator()).arg(getTypeDirectory()).arg(QDir::separator()); + .arg(QDir::separator()).arg(getTypeDirectory()).arg(QDir::separator()); QDir dir; + dir.mkpath(path); saveTemplate(path); } @@ -362,8 +363,9 @@ QString VehicleTemplateExportDialog::getTypeDirectory() void VehicleTemplateExportDialog::updateStatus() { bool enabled = m_autopilotConnected && ui->Name->text().length() > 3 && ui->Owner->text().length() > 2 && - ui->ForumNick->text().length() > 2 && ui->Size->text().length() > 0 && - ui->Weight->text().length() > 0; + ui->ForumNick->text().length() > 2 && ui->Size->text().length() > 0 && + ui->Weight->text().length() > 0; + ui->exportBtn->setEnabled(enabled); ui->saveAsBtn->setEnabled(enabled); } diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.cpp index d37a6e58b..574c683c3 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.cpp @@ -146,12 +146,16 @@ QString VehicleTemplateSelectorWidget::getTemplatePath() switch (m_vehicleType) { case VehicleConfigurationSource::VEHICLE_FIXEDWING: return VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME; + case VehicleConfigurationSource::VEHICLE_MULTI: return VehicleTemplateExportDialog::EXPORT_MULTI_NAME; + case VehicleConfigurationSource::VEHICLE_HELI: return VehicleTemplateExportDialog::EXPORT_HELI_NAME; + case VehicleConfigurationSource::VEHICLE_SURFACE: return VehicleTemplateExportDialog::EXPORT_SURFACE_NAME; + default: return NULL; }