diff --git a/companion/src/appdata.cpp b/companion/src/appdata.cpp index c76cf1559..e89244133 100644 --- a/companion/src/appdata.cpp +++ b/companion/src/appdata.cpp @@ -510,6 +510,7 @@ bool AppData::snapToClpbrd() { return _snapToClpbrd; } bool AppData::autoCheckApp() { return _autoCheckApp; } bool AppData::autoCheckFw() { return _autoCheckFw; } bool AppData::simuSW() { return _simuSW; } +bool AppData::useWizard() { return _useWizard; } int AppData::backLight() { return _backLight; } int AppData::embedSplashes() { return _embedSplashes; } @@ -562,6 +563,7 @@ void AppData::snapToClpbrd (const bool x) { store(x, _snapToClpbrd, void AppData::autoCheckApp (const bool x) { store(x, _autoCheckApp, "startup_check_companion" );} void AppData::autoCheckFw (const bool x) { store(x, _autoCheckFw, "startup_check_fw" );} void AppData::simuSW (const bool x) { store(x, _simuSW, "simuSW" );} +void AppData::useWizard (const bool x) { store(x, _useWizard, "useWizard" );} void AppData::backLight (const int x) { store(x, _backLight, "backLight" );} void AppData::embedSplashes (const int x) { store(x, _embedSplashes, "embedded_splashes" );} @@ -680,6 +682,7 @@ AppData::AppData() getset( _autoCheckApp, "startup_check_companion" ,true ); getset( _autoCheckFw, "startup_check_fw" ,true ); getset( _simuSW, "simuSW" ,false ); + getset( _useWizard, "useWizard" ,true ); getset( _backLight, "backLight" ,0 ); getset( _embedSplashes, "embedded_splashes" ,0 ); diff --git a/companion/src/appdata.h b/companion/src/appdata.h index f3e0e9922..b619de315 100644 --- a/companion/src/appdata.h +++ b/companion/src/appdata.h @@ -236,6 +236,7 @@ class AppData: protected CompStoreObj bool _autoCheckApp; bool _autoCheckFw; bool _simuSW; + bool _useWizard; int _backLight; int _embedSplashes; @@ -290,6 +291,7 @@ class AppData: protected CompStoreObj bool autoCheckApp(); bool autoCheckFw(); bool simuSW(); + bool useWizard(); int backLight(); int embedSplashes(); @@ -343,7 +345,7 @@ class AppData: protected CompStoreObj void autoCheckApp (const bool); void autoCheckFw (const bool); void simuSW (const bool); - void enableWizard (const bool); + void useWizard (const bool); void backLight (const int); void embedSplashes (const int); diff --git a/companion/src/apppreferencesdialog.cpp b/companion/src/apppreferencesdialog.cpp index 3281c7400..462200d3f 100644 --- a/companion/src/apppreferencesdialog.cpp +++ b/companion/src/apppreferencesdialog.cpp @@ -40,6 +40,7 @@ void appPreferencesDialog::writeValues() g.autoCheckFw(ui->startupCheck_fw->isChecked()); g.showSplash(ui->showSplash->isChecked()); g.simuSW(ui->simuSW->isChecked()); + g.useWizard(ui->modelWizard_CB->isChecked()); g.historySize(ui->historySize->value()); g.backLight(ui->backLightColor->currentIndex()); g.libDir(ui->libraryPath->text()); @@ -107,6 +108,7 @@ void appPreferencesDialog::initSettings() if (getRadioType(g.profile[g.id()].fwType())==6) // TODO - NOT AT ALL OK. THERE SHOULD BE A COMMON RADIO DEFINITION. ui->backLightColor->setEnabled(false); ui->simuSW->setChecked(g.simuSW()); + ui->modelWizard_CB->setChecked(g.useWizard()); ui->libraryPath->setText(g.libDir()); ui->ge_lineedit->setText(g.gePath()); diff --git a/companion/src/apppreferencesdialog.ui b/companion/src/apppreferencesdialog.ui index 056e7c06c..341302c67 100644 --- a/companion/src/apppreferencesdialog.ui +++ b/companion/src/apppreferencesdialog.ui @@ -45,7 +45,7 @@ - 0 + 1 @@ -570,28 +570,69 @@ This is used by the templated to determine which channel goes to what number out Application Settings - - - - - 350 - 0 - + + + + Show splash screen when Companion starts + + + true + + + + + + + Automatic check for Companion updates + + + true + + + + + + + Enable automatic backup before writing firmware + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + Automatic check for OpenTX firmware updates + + + true + + + + + + + true true - - - - Qt::Horizontal - - - - - + + Qt::Horizontal @@ -603,10 +644,123 @@ This is used by the templated to determine which channel goes to what number out - - + + + + Qt::Vertical + + + + 20 + 40 + + + + + + - Automatic Backup Folder + Open Folder + + + + + + + + 0 + 0 + + + + Splash Screen Library + + + + + + + + 0 + 0 + + + + Files to keep + + + + + + + Find Executable + + + + + + + Qt::Horizontal + + + + + + + Open Folder + + + + + + + + 350 + 0 + + + + true + + + + + + + Google Earth Executable + + + + + + + + 0 + 0 + + + + + Only show user splash images + + + + + Show user and companion splash images + + + + + + + + + 0 + 0 + + + + User Splash Screens @@ -632,142 +786,15 @@ This is used by the templated to determine which channel goes to what number out - - - - - 0 - 0 - - + + - User Splash Screens + Automatic Backup Folder - - - - - 0 - 0 - - - - - Only show user splash images - - - - - Show user and companion splash images - - - - - - - - Google Earth Executable - - - - - - - - 350 - 0 - - - - true - - - - - - - Open Folder - - - - - - - Qt::Horizontal - - - - - - - Find Executable - - - - - - - - 0 - 0 - - - - Files to keep - - - - - - - - 0 - 0 - - - - Splash Screen Library - - - - - - - Open Folder - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - - + + Qt::Horizontal @@ -779,50 +806,30 @@ This is used by the templated to determine which channel goes to what number out - - - - true + + + + + 350 + 0 + true - - + + - Show splash screen when Companion starts - - - true + Use model wizard when creating a new model - - - - Automatic check for OpenTX firmware updates - - - true - - - - - - - Automatic check for Companion updates - - - true - - - - - - - Enable automatic backup before writing firmware + + + + Qt::Horizontal diff --git a/companion/src/mdichild.cpp b/companion/src/mdichild.cpp index f708322ce..05f1f5640 100644 --- a/companion/src/mdichild.cpp +++ b/companion/src/mdichild.cpp @@ -206,7 +206,7 @@ void MdiChild::openEditWindow() } else{ ModelData &model = radioData.models[row - 1]; - if (model.isempty()) { + if (model.isempty() && g.useWizard()) { wizardEdit(); } else {