mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-15 08:53:53 +08:00
fix: OCR selection issue on multi-monitor setup (#1183)
This commit is contained in:
parent
731056c8a1
commit
fd4b66021e
@ -286,12 +286,14 @@ screen_shot_ui = None
|
|||||||
|
|
||||||
def rangeselct_function(callback, startauto):
|
def rangeselct_function(callback, startauto):
|
||||||
global screen_shot_ui
|
global screen_shot_ui
|
||||||
if screen_shot_ui is None:
|
if screen_shot_ui is not None:
|
||||||
|
# 完全销毁旧的实例
|
||||||
|
screen_shot_ui.deleteLater()
|
||||||
|
screen_shot_ui = None
|
||||||
|
|
||||||
screen_shot_ui = rangeselect()
|
screen_shot_ui = rangeselect()
|
||||||
# 可能是由于使用win32移动窗口,导致父翻译show/hide影响到他
|
|
||||||
screen_shot_ui.show()
|
screen_shot_ui.show()
|
||||||
screen_shot_ui.reset()
|
screen_shot_ui.reset()
|
||||||
screen_shot_ui.callback = callback
|
screen_shot_ui.callback = callback
|
||||||
windows.SetFocus(int(screen_shot_ui.winId()))
|
windows.SetFocus(int(screen_shot_ui.winId()))
|
||||||
|
|
||||||
screen_shot_ui.startauto = startauto
|
screen_shot_ui.startauto = startauto
|
||||||
|
Loading…
x
Reference in New Issue
Block a user