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