From 4c10c20a2c555fa2952e2b4d5be9d57b53bcbdb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=85=B1=E5=A4=A9=E5=B0=8F=E7=A6=BD=E5=85=BD?= Date: Sun, 5 Nov 2023 20:04:02 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20the=20bug=20that=20some=20Windows=20users?= =?UTF-8?q?=20cannot=20open=20the=20application=20in=20v7.4.6=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dv7.4.6=E7=89=88=E6=9C=AC=EF=BC=8C=E9=83=A8=E5=88=86win?= =?UTF-8?q?dows=E7=AB=AF=E7=94=A8=E6=88=B7=E6=97=A0=E6=B3=95=E6=89=93?= =?UTF-8?q?=E5=BC=80=E5=BA=94=E7=94=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog/v7.4.7+146.md | 2 ++ lib/src/setting/super_resolution_setting.dart | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog/v7.4.7+146.md b/changelog/v7.4.7+146.md index 059c4a8f..d62743fc 100644 --- a/changelog/v7.4.7+146.md +++ b/changelog/v7.4.7+146.md @@ -1,3 +1,4 @@ +- 修复v7.4.6版本,部分windows端用户无法打开应用的bug - 优化桌面端保存至图库时的图片命名规则 - 桌面端使用新的窗口组件 - 桌面端支持F11全屏 @@ -7,6 +8,7 @@ ------------------------------------------------------------------------------------------ +- Fix the bug that some Windows users cannot open the application in v7.4.6 - Optimize the naming rule of images when saving on desktop - Use new window component on desktop - Support F11 to toggle full screen mode on desktop diff --git a/lib/src/setting/super_resolution_setting.dart b/lib/src/setting/super_resolution_setting.dart index ae0aa8be..8ac16c41 100644 --- a/lib/src/setting/super_resolution_setting.dart +++ b/lib/src/setting/super_resolution_setting.dart @@ -134,7 +134,7 @@ class SuperResolutionSetting { static _initFromMap(Map map) { modelDirectoryPath.value = map['modelDirectoryPath']; - model.value = ModelType.values[map['model']]; + model.value = map['model'] == null ? ModelType.CUGAN : ModelType.values[map['model']]; gpuId.value = map['gpuId'] ?? gpuId.value; } }