| 461 | } |
| 462 | |
| 463 | void SettingsEditor::updateModels() |
| 464 | { |
| 465 | const auto source = ui->tesseractLangCombo->currentText(); |
| 466 | models_.update(ui->tessdataPath->text(), ui->translatorsPath->text()); |
| 467 | if (!source.isEmpty()) { |
| 468 | ui->tesseractLangCombo->setCurrentText(source); |
| 469 | } else if (ui->tesseractLangCombo->count() > 0) { |
| 470 | ui->tesseractLangCombo->setCurrentIndex(0); |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | void SettingsEditor::pickColor(QWidget *widget) |
| 475 | { |