fix: OCR selection issue on multi-monitor setup (#1183)

This commit is contained in:
KAI 2024-11-25 12:16:51 +09:00 committed by GitHub
parent 731056c8a1
commit fd4b66021e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -286,12 +286,14 @@ screen_shot_ui = None
def rangeselct_function(callback, startauto):
global screen_shot_ui
if screen_shot_ui is None:
screen_shot_ui = rangeselect()
# 可能是由于使用win32移动窗口导致父翻译show/hide影响到他
if screen_shot_ui is not None:
# 完全销毁旧的实例
screen_shot_ui.deleteLater()
screen_shot_ui = None
screen_shot_ui = rangeselect()
screen_shot_ui.show()
screen_shot_ui.reset()
screen_shot_ui.callback = callback
windows.SetFocus(int(screen_shot_ui.winId()))
screen_shot_ui.startauto = startauto