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:
|
except:
|
||||||
pass
|
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:
|
if onlytrans == False:
|
||||||
self.currenttext = text
|
self.currenttext = text
|
||||||
self.currenttranslate = ""
|
self.currenttranslate = ""
|
||||||
|
@ -221,14 +221,14 @@ class browserdialog(saveposwindow):
|
|||||||
|
|
||||||
|
|
||||||
def maybehavebutton(self, gameuid, post):
|
def maybehavebutton(self, gameuid, post):
|
||||||
|
save_text_process_info = savehook_new_data[gameuid]["save_text_process_info"]
|
||||||
if post == "_11":
|
if post == "_11":
|
||||||
savehook_new_data[gameuid]["save_text_process_info"]["mypost"] = str(
|
if "mypost" not in save_text_process_info:
|
||||||
uuid.uuid4()
|
save_text_process_info["mypost"] = str(uuid.uuid4()).replace("-", "_")
|
||||||
).replace("-", "_")
|
|
||||||
return getIconButton(
|
return getIconButton(
|
||||||
callback=functools.partial(
|
callback=functools.partial(
|
||||||
selectdebugfile,
|
selectdebugfile,
|
||||||
savehook_new_data[gameuid]["save_text_process_info"]["mypost"],
|
save_text_process_info["mypost"],
|
||||||
ismypost=True,
|
ismypost=True,
|
||||||
),
|
),
|
||||||
icon="fa.gear",
|
icon="fa.gear",
|
||||||
@ -245,29 +245,25 @@ def maybehavebutton(self, gameuid, post):
|
|||||||
callback = functools.partial(
|
callback = functools.partial(
|
||||||
postconfigdialog2x,
|
postconfigdialog2x,
|
||||||
self,
|
self,
|
||||||
savehook_new_data[gameuid]["save_text_process_info"][
|
save_text_process_info["postprocessconfig"][post]["args"][
|
||||||
"postprocessconfig"
|
"internal"
|
||||||
][post]["args"]["internal"],
|
],
|
||||||
savehook_new_data[gameuid]["save_text_process_info"][
|
save_text_process_info["postprocessconfig"][post]["name"],
|
||||||
"postprocessconfig"
|
|
||||||
][post]["name"],
|
|
||||||
["正则", "转义", "原文内容", "替换为"],
|
["正则", "转义", "原文内容", "替换为"],
|
||||||
)
|
)
|
||||||
elif isinstance(list(postprocessconfig[post]["args"].values())[0], dict):
|
elif isinstance(list(postprocessconfig[post]["args"].values())[0], dict):
|
||||||
callback = functools.partial(
|
callback = functools.partial(
|
||||||
postconfigdialog,
|
postconfigdialog,
|
||||||
self,
|
self,
|
||||||
savehook_new_data[gameuid]["save_text_process_info"][
|
save_text_process_info["postprocessconfig"][post]["args"][
|
||||||
"postprocessconfig"
|
"替换内容"
|
||||||
][post]["args"]["替换内容"],
|
],
|
||||||
postprocessconfig[post]["name"],
|
postprocessconfig[post]["name"],
|
||||||
["原文内容", "替换为"],
|
["原文内容", "替换为"],
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
items = autoinitdialog_items(
|
items = autoinitdialog_items(
|
||||||
savehook_new_data[gameuid]["save_text_process_info"][
|
save_text_process_info["postprocessconfig"][post]
|
||||||
"postprocessconfig"
|
|
||||||
][post]
|
|
||||||
)
|
)
|
||||||
callback = functools.partial(
|
callback = functools.partial(
|
||||||
autoinitdialog,
|
autoinitdialog,
|
||||||
|
@ -48,7 +48,7 @@ class Textbrowser(QFrame):
|
|||||||
globalconfig["rendertext_using"] = "textbrowser"
|
globalconfig["rendertext_using"] = "textbrowser"
|
||||||
tb = importlib.import_module(f"rendertext.textbrowser").TextBrowser
|
tb = importlib.import_module(f"rendertext.textbrowser").TextBrowser
|
||||||
self.textbrowser = tb(self)
|
self.textbrowser = tb(self)
|
||||||
|
self.textbrowser.move(0, 0)
|
||||||
self.textbrowser.setMouseTracking(True)
|
self.textbrowser.setMouseTracking(True)
|
||||||
self.textbrowser.contentsChanged.connect(self._contentsChanged)
|
self.textbrowser.contentsChanged.connect(self._contentsChanged)
|
||||||
self.textbrowser.resize(size)
|
self.textbrowser.resize(size)
|
||||||
|
@ -29,7 +29,7 @@ include(generate_product_version)
|
|||||||
|
|
||||||
set(VERSION_MAJOR 5)
|
set(VERSION_MAJOR 5)
|
||||||
set(VERSION_MINOR 33)
|
set(VERSION_MINOR 33)
|
||||||
set(VERSION_PATCH 1)
|
set(VERSION_PATCH 2)
|
||||||
|
|
||||||
add_library(pch pch.cpp)
|
add_library(pch pch.cpp)
|
||||||
target_precompile_headers(pch PUBLIC pch.h)
|
target_precompile_headers(pch PUBLIC pch.h)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user