Select first item of source languages if none is selected

This commit is contained in:
Gres 2020-07-12 15:28:40 +03:00
parent 19f814261c
commit 092c5e65ca

View File

@ -353,7 +353,11 @@ void SettingsEditor::updateModels(const QString &tessdataPath)
{ {
const auto source = ui->tesseractLangCombo->currentText(); const auto source = ui->tesseractLangCombo->currentText();
models_.update(tessdataPath); models_.update(tessdataPath);
if (!source.isEmpty()) {
ui->tesseractLangCombo->setCurrentText(source); ui->tesseractLangCombo->setCurrentText(source);
} else if (ui->tesseractLangCombo->count() > 0) {
ui->tesseractLangCombo->setCurrentIndex(0);
}
} }
void SettingsEditor::pickColor(ColorContext context) void SettingsEditor::pickColor(ColorContext context)