mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
fix
This commit is contained in:
parent
bdf5c973aa
commit
b1bd2e5fb3
@ -235,19 +235,17 @@ class MAINUI:
|
||||
self.currentread = text
|
||||
self.autoreadcheckname()
|
||||
|
||||
self.transhis.getnewsentencesignal.emit(text)
|
||||
self.maybesetedittext(text)
|
||||
_showrawfunction = functools.partial(
|
||||
self.translation_ui.displayraw1.emit,
|
||||
dict(text=text, color=globalconfig["rawtextcolor"], onlytrans=onlytrans),
|
||||
)
|
||||
if globalconfig["refresh_on_get_trans"] == False:
|
||||
self.translation_ui.displayraw1.emit(
|
||||
dict(text=text, color=globalconfig["rawtextcolor"], onlytrans=onlytrans)
|
||||
)
|
||||
_showrawfunction()
|
||||
_showrawfunction = None
|
||||
_showrawfunction_sig = 0
|
||||
else:
|
||||
_showrawfunction = functools.partial(
|
||||
self.translation_ui.displayraw1.emit,
|
||||
dict(
|
||||
text=text, color=globalconfig["rawtextcolor"], onlytrans=onlytrans
|
||||
),
|
||||
)
|
||||
_showrawfunction_sig = time.time()
|
||||
|
||||
text_solved, optimization_params = self.solvebeforetrans(text)
|
||||
@ -329,6 +327,7 @@ class MAINUI:
|
||||
)
|
||||
if no_available_translator:
|
||||
safe_embedcallback_none()
|
||||
_showrawfunction()
|
||||
|
||||
def ifuse_fix_translate_rank_preprare(self, engine, onlytrans, embedcallback):
|
||||
if onlytrans:
|
||||
|
@ -102,7 +102,6 @@ class QUnFrameWindow(resizableframeless):
|
||||
onlytrans = kwargs.get("onlytrans")
|
||||
|
||||
clear = True
|
||||
gobject.baseobject.transhis.getnewsentencesignal.emit(text)
|
||||
if onlytrans:
|
||||
return
|
||||
if len(text) > globalconfig["maxoriginlength"]:
|
||||
@ -114,8 +113,6 @@ class QUnFrameWindow(resizableframeless):
|
||||
else:
|
||||
self.showline(clear=clear)
|
||||
|
||||
gobject.baseobject.maybesetedittext(text)
|
||||
|
||||
def showstatus(self, res, color, clear, origin):
|
||||
self.showline(clear=clear, text=res, color=color, origin=origin)
|
||||
|
||||
|
@ -304,7 +304,6 @@ class TextBrowser(QWidget, dataget):
|
||||
subtext.append("")
|
||||
subtext[-1] += text[i]
|
||||
|
||||
thisy0 = 99999
|
||||
collects = []
|
||||
for i in range(len(subtext)):
|
||||
if i >= len(self.iteryinyinglabelsave[iter_context_class]):
|
||||
@ -318,8 +317,10 @@ class TextBrowser(QWidget, dataget):
|
||||
_.adjustSize()
|
||||
_.move(subpos[i])
|
||||
_.show()
|
||||
thisy0 = min(thisy0, _.y())
|
||||
|
||||
self.textcursor.setPosition(pos)
|
||||
self.textbrowser.setTextCursor(self.textcursor)
|
||||
tl1 = self.textbrowser.cursorRect(self.textcursor).topLeft()
|
||||
thisy0 = tl1.y()
|
||||
for label in self.yinyinglabels:
|
||||
if label.isVisible() == False:
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user