mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
fb1ba27830
commit
eb9849391c
@ -363,9 +363,6 @@ class Textbrowser( ):
|
|||||||
wwww=self.parent.width()
|
wwww=self.parent.width()
|
||||||
for word in x:
|
for word in x:
|
||||||
idx+=1
|
idx+=1
|
||||||
if word['orig']=='\n':
|
|
||||||
guesslinehead=None
|
|
||||||
continue
|
|
||||||
l=len(word['orig'])
|
l=len(word['orig'])
|
||||||
tl1=self.textbrowser.cursorRect(self.textcursor).topLeft()
|
tl1=self.textbrowser.cursorRect(self.textcursor).topLeft()
|
||||||
|
|
||||||
@ -526,8 +523,6 @@ class Textbrowser( ):
|
|||||||
x=self.nearmerge(x,pos,fonthira,fontorig)
|
x=self.nearmerge(x,pos,fonthira,fontorig)
|
||||||
self.settextposcursor(pos)
|
self.settextposcursor(pos)
|
||||||
for word in x:
|
for word in x:
|
||||||
if word['orig']=='\n':
|
|
||||||
continue
|
|
||||||
l=len(word['orig'])
|
l=len(word['orig'])
|
||||||
|
|
||||||
tl1=self.textbrowser.cursorRect(self.textcursor).topLeft()
|
tl1=self.textbrowser.cursorRect(self.textcursor).topLeft()
|
||||||
@ -562,8 +557,7 @@ class Textbrowser( ):
|
|||||||
word['hira_w']=_metrichira.width(word['hira'])
|
word['hira_w']=_metrichira.width(word['hira'])
|
||||||
#print(word['hira'],word['hira_w'])
|
#print(word['hira'],word['hira_w'])
|
||||||
newline.append(word)
|
newline.append(word)
|
||||||
if word['orig']=='\n':
|
|
||||||
continue
|
|
||||||
l=len(word['orig'])
|
l=len(word['orig'])
|
||||||
tl1=self.textbrowser.cursorRect(self.textcursor).topLeft()
|
tl1=self.textbrowser.cursorRect(self.textcursor).topLeft()
|
||||||
self.settextposcursor(pos+l)
|
self.settextposcursor(pos+l)
|
||||||
|
@ -169,7 +169,11 @@ class QUnFrameWindow(resizableframeless):
|
|||||||
return
|
return
|
||||||
text=self.cleartext(text)
|
text=self.cleartext(text)
|
||||||
if hira:
|
if hira:
|
||||||
hira=self.parsehira(text)
|
hiras=[self.parsehira(_) for _ in text.split('\n')]
|
||||||
|
hira=[]
|
||||||
|
for i,_h in enumerate(hiras):
|
||||||
|
if i: hira+=[{'orig':'\n','hira':'\n'}]
|
||||||
|
hira+=_h
|
||||||
else:
|
else:
|
||||||
hira=[]
|
hira=[]
|
||||||
self.translate_text.setnextfont(origin)
|
self.translate_text.setnextfont(origin)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user