1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 01:35:21 +03:00

Issue #555 fixed (core in customizetxdialog)

This commit is contained in:
Bertrand Songis 2014-01-18 07:49:05 +01:00
parent 296b12ffdb
commit 5160fd8503

View file

@ -21,8 +21,9 @@ customizeSplashDialog::~customizeSplashDialog() {
void customizeSplashDialog::on_FlashLoadButton_clicked()
{
QString fileName;
QSettings settings("companion", "companion");
QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastFlashDir").toString(), FLASH_FILES_FILTER);
if (!fileName.isEmpty()) {
ui->ImageLoadButton->setDisabled(true);
ui->libraryButton->setDisabled(true);
ui->SaveFlashButton->setDisabled(true);
@ -31,7 +32,6 @@ void customizeSplashDialog::on_FlashLoadButton_clicked()
ui->imageLabel->clear();
ui->HowToLabel->clear();
ui->HowToLabel->setStyleSheet("background:rgb(255, 255, 0)");
fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastFlashDir").toString(), FLASH_FILES_FILTER);
QFile file(fileName);
if (!file.exists()) {
ui->FWFileName->clear();
@ -58,6 +58,7 @@ void customizeSplashDialog::on_FlashLoadButton_clicked()
return;
}
settings.setValue("lastFlashDir", QFileInfo(fileName).dir().absolutePath());
}
}
void customizeSplashDialog::on_ImageLoadButton_clicked() {