diff --git a/LunaTranslator/LunaTranslator/gui/setting_translate.py b/LunaTranslator/LunaTranslator/gui/setting_translate.py index 32598340..91fc70f1 100644 --- a/LunaTranslator/LunaTranslator/gui/setting_translate.py +++ b/LunaTranslator/LunaTranslator/gui/setting_translate.py @@ -126,10 +126,15 @@ def getalistname(parent, copy, btnplus, callback): def selectllmcallback(self, countnum, btnplus, fanyi, name): uid = str(uuid.uuid4()) - _f1 = "./Lunatranslator/translator/{}.py".format(fanyi) + _f11 = "./Lunatranslator/translator/{}.py".format(fanyi) + _f12 = "./userconfig/copyed/{}.py".format(fanyi) _f2 = "./userconfig/copyed/{}.py".format(uid) os.makedirs("./userconfig/copyed", exist_ok=True) - shutil.copy(_f1, _f2) + try: + shutil.copy(_f11, _f2) + except: + shutil.copy(_f12, _f2) + globalconfig["fanyi"][uid] = deepcopydict(globalconfig["fanyi"][fanyi]) globalconfig["fanyi"][uid]["use"] = False diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 9981eaf4..353adafa 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 30) -set(VERSION_PATCH 3) +set(VERSION_PATCH 4) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)