From a79ac9ca1f18297044806262abb0511f80148705 Mon Sep 17 00:00:00 2001 From: liangweifeng Date: Sun, 11 Jan 2026 17:23:02 +0800 Subject: [PATCH] fix: Auto-select downloaded model after download completes Previously, after downloading a model, the selection would revert to the first available model (usually tiny). Now it automatically selects the just-downloaded model. Fixes #939 Co-Authored-By: Claude Opus 4.5 --- app/components/FasterWhisperSettingWidget.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/components/FasterWhisperSettingWidget.py b/app/components/FasterWhisperSettingWidget.py index 7333e34c..b1656ae8 100644 --- a/app/components/FasterWhisperSettingWidget.py +++ b/app/components/FasterWhisperSettingWidget.py @@ -574,11 +574,12 @@ def _on_model_download_finished(): for enum_val in available: combo.addItem(enum_val.value, userData=enum_val) - # 恢复选择 - if current_value in available: - combo.setCurrentText(current_value.value) - elif combo.count() > 0: - combo.setCurrentIndex(0) + # 自动选择刚下载的模型 + downloaded_model_value = model["value"] + for enum_val in available: + if enum_val.value == downloaded_model_value: + combo.setCurrentText(enum_val.value) + break InfoBar.success( self.tr("下载成功"),