mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
repair
This commit is contained in:
parent
07d1172614
commit
ef52227523
@ -122,12 +122,9 @@ class edittrans(QMainWindow):
|
|||||||
self.trykeeppos()
|
self.trykeeppos()
|
||||||
|
|
||||||
def trykeeppos(self):
|
def trykeeppos(self):
|
||||||
try:
|
self.followhwnd = gobject.baseobject.textsource.hwnd
|
||||||
self.followhwnd = gobject.baseobject.textsource.hwnd
|
self.follow()
|
||||||
self.follow()
|
self.show()
|
||||||
self.show()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
@threader
|
@threader
|
||||||
def follow(self):
|
def follow(self):
|
||||||
|
@ -43,8 +43,12 @@ def Singleton_impl(cls, behavior="activate"):
|
|||||||
self.deleteLater()
|
self.deleteLater()
|
||||||
_instance.pop(cls)
|
_instance.pop(cls)
|
||||||
_lock.release()
|
_lock.release()
|
||||||
|
try:
|
||||||
_inst = __(*args, **kwagrs)
|
_inst = __(*args, **kwagrs)
|
||||||
|
except:
|
||||||
|
print_exc()
|
||||||
|
_lock.release()
|
||||||
|
return None
|
||||||
if _inst.Singleton_flag:
|
if _inst.Singleton_flag:
|
||||||
_instance[cls] = _inst
|
_instance[cls] = _inst
|
||||||
return _inst
|
return _inst
|
||||||
|
Loading…
x
Reference in New Issue
Block a user