1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

Fixes missing or invalid SD path (#6441)

This commit is contained in:
Neil Horne 2019-05-23 00:02:09 +10:00 committed by Bertrand Songis
parent 31ed6cd9e6
commit be035ed612

View file

@ -27,6 +27,9 @@
#include "modelprinter.h"
#include "multiprotocols.h"
#include "checklistdialog.h"
#include "helpers.h"
#include <QDir>
TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, Firmware * firmware, QWidget * prevFocus, RawSwitchFilterItemModel * switchModel):
ModelPanel(parent, model, generalSettings, firmware),
@ -1355,6 +1358,13 @@ void SetupPanel::onBeepCenterToggled(bool checked)
void SetupPanel::on_editText_clicked()
{
ChecklistDialog *g = new ChecklistDialog(this, model);
g->exec();
const QString path = Helpers::getChecklistsPath();
QDir d(path);
if (!d.exists()) {
QMessageBox::critical(this, tr("Profile Settings"), tr("SD structure path not specified or invalid"));
}
else {
ChecklistDialog *g = new ChecklistDialog(this, model);
g->exec();
}
}