| 891 | } |
| 892 | |
| 893 | void OCREdit::LanguageChanged() |
| 894 | { |
| 895 | GUARD_LOADING_AND_LOCK(); |
| 896 | if (!_entryData->SetLanguageCode(_languageCode->text().toStdString())) { |
| 897 | const QString message(obs_module_text( |
| 898 | "AdvSceneSwitcher.condition.video.ocrLanguageNotFound")); |
| 899 | const QDir dataDir(QString::fromStdString( |
| 900 | _entryData->_ocrParameters.GetTesseractBasePath())); |
| 901 | const QString fileName(_languageCode->text() + ".traineddata"); |
| 902 | DisplayMessage(message.arg(fileName, dataDir.absolutePath())); |
| 903 | |
| 904 | // Reset to previous value |
| 905 | const QSignalBlocker b(this); |
| 906 | _languageCode->setText( |
| 907 | _entryData->_ocrParameters.GetLanguageCode()); |
| 908 | return; |
| 909 | } |
| 910 | _previewDialog->OCRParametersChanged(_entryData->_ocrParameters); |
| 911 | } |
| 912 | |
| 913 | void OCREdit::UseConfigChanged(int value) |
| 914 | { |
nothing calls this directly
no test coverage detected