mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
c42b30a40d
commit
c25aa58c6b
@ -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 = ""
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user