Add default internal module to radio profile

This commit is contained in:
elecpower
2022-01-02 13:05:09 +01:00
committed by Raphael Coeffic
parent 592f173a94
commit e728560a45
3 changed files with 381 additions and 363 deletions
+7
View File
@@ -28,6 +28,10 @@
#include "joystick.h"
#include "joystickdialog.h"
#endif
#include "moduledata.h"
#include "compounditemmodels.h"
#include <QAbstractItemModel>
AppPreferencesDialog::AppPreferencesDialog(QWidget * parent) :
QDialog(parent),
@@ -97,6 +101,7 @@ void AppPreferencesDialog::accept()
g.jsSupport(false);
g.jsCtrl(0);
}
profile.defaultInternalModule(ui->defaultInternalModuleCB->currentData().toInt());
profile.channelOrder(ui->channelorderCB->currentIndex());
profile.defaultMode(ui->stickmodeCB->currentIndex());
profile.renameFwFiles(ui->renameFirmware->isChecked());
@@ -256,6 +261,8 @@ void AppPreferencesDialog::initSettings()
}
#endif
// Profile Tab Inits
ui->defaultInternalModuleCB->setModel(ModuleData::internalModuleItemModel());
ui->defaultInternalModuleCB->setCurrentIndex(ui->defaultInternalModuleCB->findData(profile.defaultInternalModule()));
ui->channelorderCB->setCurrentIndex(profile.channelOrder());
ui->stickmodeCB->setCurrentIndex(profile.defaultMode());
ui->renameFirmware->setChecked(profile.renameFwFiles());