Both the latest downloaded firmware variant and file name are now consistently stored in the profile. This means that switching profile switches both at the same time. Previously the file name was global and the firmware variant was stored per profile. This made use of profiles confusing.
This commit is contained in:
@@ -63,7 +63,8 @@ void appPreferencesDialog::writeValues()
|
||||
g.profile[g.id()].name(ui->profileNameLE->text());
|
||||
g.profile[g.id()].sdPath(ui->sdPath->text());
|
||||
g.profile[g.id()].splashFile(ui->SplashFileName->text());
|
||||
g.profile[g.id()].firmware(ui->firmwareLE->text());
|
||||
g.profile[g.id()].fwName(ui->fwNameLE->text());
|
||||
g.profile[g.id()].fwType(ui->fwTypeLE->text());
|
||||
|
||||
saveProfile();
|
||||
}
|
||||
@@ -145,7 +146,8 @@ void appPreferencesDialog::initSettings()
|
||||
ui->renameFirmware->setChecked(g.profile[g.id()].renameFwFiles());
|
||||
ui->sdPath->setText(g.profile[g.id()].sdPath());
|
||||
ui->profileNameLE->setText(g.profile[g.id()].name());
|
||||
ui->firmwareLE->setText(g.profile[g.id()].firmware());
|
||||
ui->fwNameLE->setText(g.profile[g.id()].fwName());
|
||||
ui->fwTypeLE->setText(g.profile[g.id()].fwType());
|
||||
ui->SplashFileName->setText(g.profile[g.id()].splashFile());
|
||||
|
||||
displayImage( g.profile[g.id()].splashFile() );
|
||||
@@ -248,7 +250,8 @@ void appPreferencesDialog::saveProfile()
|
||||
g.profile[g.id()].renameFwFiles( ui->renameFirmware->isChecked());
|
||||
g.profile[g.id()].sdPath( ui->sdPath->text());
|
||||
g.profile[g.id()].splashFile( ui->SplashFileName->text());
|
||||
g.profile[g.id()].firmware( ui->firmwareLE->text());
|
||||
g.profile[g.id()].fwName( ui->fwNameLE->text());
|
||||
g.profile[g.id()].fwType( ui->fwTypeLE->text());
|
||||
}
|
||||
|
||||
void appPreferencesDialog::on_removeProfileButton_clicked()
|
||||
@@ -274,7 +277,7 @@ bool appPreferencesDialog::displayImage( QString fileName )
|
||||
|
||||
// Use the firmware name to determine splash width
|
||||
int width = SPLASH_WIDTH;
|
||||
if (g.profile[g.id()].firmware().contains("taranis"))
|
||||
if (g.profile[g.id()].fwType().contains("taranis"))
|
||||
width = SPLASHX9D_WIDTH;
|
||||
|
||||
ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(width, SPLASH_HEIGHT)));
|
||||
|
||||
Reference in New Issue
Block a user