diff --git a/LunaTranslator/LunaTranslator/LunaTranslator.py b/LunaTranslator/LunaTranslator/LunaTranslator.py index 86f79892..e7e22846 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator.py @@ -309,6 +309,12 @@ class MAINUI: ) except: pass + if ( + (windows.GetKeyState(windows.VK_CONTROL) < 0) + or (windows.GetKeyState(windows.VK_SHIFT) < 0) + or (windows.GetKeyState(windows.VK_RETURN) < 0) + ): + return safe_callback_none() if onlytrans == False: self.currenttext = text self.currenttranslate = "" diff --git a/LunaTranslator/LunaTranslator/gui/dialog_savedgame_setting.py b/LunaTranslator/LunaTranslator/gui/dialog_savedgame_setting.py index 43fedcda..b8139ed9 100644 --- a/LunaTranslator/LunaTranslator/gui/dialog_savedgame_setting.py +++ b/LunaTranslator/LunaTranslator/gui/dialog_savedgame_setting.py @@ -221,14 +221,14 @@ class browserdialog(saveposwindow): def maybehavebutton(self, gameuid, post): + save_text_process_info = savehook_new_data[gameuid]["save_text_process_info"] if post == "_11": - savehook_new_data[gameuid]["save_text_process_info"]["mypost"] = str( - uuid.uuid4() - ).replace("-", "_") + if "mypost" not in save_text_process_info: + save_text_process_info["mypost"] = str(uuid.uuid4()).replace("-", "_") return getIconButton( callback=functools.partial( selectdebugfile, - savehook_new_data[gameuid]["save_text_process_info"]["mypost"], + save_text_process_info["mypost"], ismypost=True, ), icon="fa.gear", @@ -245,29 +245,25 @@ def maybehavebutton(self, gameuid, post): callback = functools.partial( postconfigdialog2x, self, - savehook_new_data[gameuid]["save_text_process_info"][ - "postprocessconfig" - ][post]["args"]["internal"], - savehook_new_data[gameuid]["save_text_process_info"][ - "postprocessconfig" - ][post]["name"], + save_text_process_info["postprocessconfig"][post]["args"][ + "internal" + ], + save_text_process_info["postprocessconfig"][post]["name"], ["正则", "转义", "原文内容", "替换为"], ) elif isinstance(list(postprocessconfig[post]["args"].values())[0], dict): callback = functools.partial( postconfigdialog, self, - savehook_new_data[gameuid]["save_text_process_info"][ - "postprocessconfig" - ][post]["args"]["替换内容"], + save_text_process_info["postprocessconfig"][post]["args"][ + "替换内容" + ], postprocessconfig[post]["name"], ["原文内容", "替换为"], ) else: items = autoinitdialog_items( - savehook_new_data[gameuid]["save_text_process_info"][ - "postprocessconfig" - ][post] + save_text_process_info["postprocessconfig"][post] ) callback = functools.partial( autoinitdialog, diff --git a/LunaTranslator/LunaTranslator/gui/textbrowser.py b/LunaTranslator/LunaTranslator/gui/textbrowser.py index 3e23aea1..99f25037 100644 --- a/LunaTranslator/LunaTranslator/gui/textbrowser.py +++ b/LunaTranslator/LunaTranslator/gui/textbrowser.py @@ -48,7 +48,7 @@ class Textbrowser(QFrame): globalconfig["rendertext_using"] = "textbrowser" tb = importlib.import_module(f"rendertext.textbrowser").TextBrowser self.textbrowser = tb(self) - + self.textbrowser.move(0, 0) self.textbrowser.setMouseTracking(True) self.textbrowser.contentsChanged.connect(self._contentsChanged) self.textbrowser.resize(size) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 9248a284..e441505e 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 33) -set(VERSION_PATCH 1) +set(VERSION_PATCH 2) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)