mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
fa0e70ac98
commit
03c875d13f
@ -198,8 +198,12 @@ class QUnFrameWindow(resizableframeless):
|
|||||||
self.saveiterclasspointer[iter_context_class]={'curr':self.translate_text.getcurrpointer(),'start':self.translate_text.getcurrpointer()}
|
self.saveiterclasspointer[iter_context_class]={'curr':self.translate_text.getcurrpointer(),'start':self.translate_text.getcurrpointer()}
|
||||||
else:
|
else:
|
||||||
currbefore=self.saveiterclasspointer[iter_context_class]['curr']
|
currbefore=self.saveiterclasspointer[iter_context_class]['curr']
|
||||||
|
if globalconfig['zitiyangshi'] !=3:
|
||||||
|
#阴影字体blcoksignal会UpdateLayeredWindowIndirect failed for
|
||||||
|
#其他字体不blocksignal会高度抖动
|
||||||
self.document.blockSignals(True)
|
self.document.blockSignals(True)
|
||||||
self.translate_text.deletebetween(self.saveiterclasspointer[iter_context_class]['start'],self.saveiterclasspointer[iter_context_class]['curr'])
|
self.translate_text.deletebetween(self.saveiterclasspointer[iter_context_class]['start'],self.saveiterclasspointer[iter_context_class]['curr'])
|
||||||
|
if globalconfig['zitiyangshi'] !=3:
|
||||||
self.document.blockSignals(False)
|
self.document.blockSignals(False)
|
||||||
self.translate_text.insertatpointer(self.saveiterclasspointer[iter_context_class]['start'],text)
|
self.translate_text.insertatpointer(self.saveiterclasspointer[iter_context_class]['start'],text)
|
||||||
currcurrent=self.translate_text.getcurrpointer()
|
currcurrent=self.translate_text.getcurrpointer()
|
||||||
|
@ -7,7 +7,7 @@ import os,time ,types
|
|||||||
import zhconv,gobject
|
import zhconv,gobject
|
||||||
import sqlite3
|
import sqlite3
|
||||||
from myutils.commonbase import commonbase
|
from myutils.commonbase import commonbase
|
||||||
|
import functools
|
||||||
from myutils.utils import stringfyerror,autosql
|
from myutils.utils import stringfyerror,autosql
|
||||||
from myutils.commonbase import ArgsEmptyExc
|
from myutils.commonbase import ArgsEmptyExc
|
||||||
from myutils.wrapper import stripwrapper
|
from myutils.wrapper import stripwrapper
|
||||||
@ -268,14 +268,13 @@ class basetrans(commonbase):
|
|||||||
callback(''.join(collectiterres),embedcallback,is_iter_res)
|
callback(''.join(collectiterres),embedcallback,is_iter_res)
|
||||||
|
|
||||||
if isinstance(res,types.GeneratorType):
|
if isinstance(res,types.GeneratorType):
|
||||||
def _iterget():
|
def _iterget(rid,__res):
|
||||||
rid=self.requestid
|
for i,_res in enumerate(__res):
|
||||||
for i,_res in enumerate(res):
|
|
||||||
if i==0:__callback('',3)
|
if i==0:__callback('',3)
|
||||||
if self.requestid!=rid:break
|
if self.requestid!=rid:break
|
||||||
__callback(_res,1)
|
__callback(_res,1)
|
||||||
__callback('',2)
|
__callback('',2)
|
||||||
timeoutfunction(_iterget,checktutukufunction=checktutukufunction )
|
timeoutfunction(functools.partial(_iterget,self.requestid,res),checktutukufunction=checktutukufunction )
|
||||||
|
|
||||||
else:
|
else:
|
||||||
__callback(res,0)
|
__callback(res,0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user