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