From d094a9814a1f9eecab1460c85213a1a48704b35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:00:21 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/myutils/localetools.py | 6 +++--- plugins/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LunaTranslator/LunaTranslator/myutils/localetools.py b/LunaTranslator/LunaTranslator/myutils/localetools.py index 9c3505e2..397484d4 100644 --- a/LunaTranslator/LunaTranslator/myutils/localetools.py +++ b/LunaTranslator/LunaTranslator/myutils/localetools.py @@ -122,11 +122,11 @@ class le_internal(LEbase, settingxx): if not LEProc: return guids = self.profiles(config)[1] + guids_ = self.profiles({})[1] guid = config.get("leguid", None) if guid not in guids: guid = guids[0] - idx = guids.index(guid) - if idx <= 1: + if guid in guids_: arg = '"{}" -runas {} {}'.format(LEProc, guid, usearg) else: # 程序的配置运行 @@ -420,7 +420,7 @@ class lr_internal(LEbase, settingxx): guids = self.profiles(config)[1] guid = config.get("lrguid", None) if guid not in guids: - guids = guids[0] + guid = guids[0] arg = '"{}" {} {}'.format(LEProc, guid, usearg) windows.CreateProcess( None, diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 185118a1..677a04b0 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 42) -set(VERSION_PATCH 3) +set(VERSION_PATCH 4) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)