From 366cb3f7101fe43ad7a4a03ff0b4be4348b84914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Thu, 15 Aug 2024 03:50:27 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/gui/rangeselect.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LunaTranslator/LunaTranslator/gui/rangeselect.py b/LunaTranslator/LunaTranslator/gui/rangeselect.py index e2dd79d7..a5fa8836 100644 --- a/LunaTranslator/LunaTranslator/gui/rangeselect.py +++ b/LunaTranslator/LunaTranslator/gui/rangeselect.py @@ -14,6 +14,10 @@ class rangeadjust(Mainw): self.traceposstart = pos def traceoffset(self, curr): + keystate = windows.GetKeyState(windows.VK_LBUTTON) + if keystate < 0 and windows.GetForegroundWindow() == int(self.winId()): + self.tracepos = QPoint() + return if self._isTracking: self.tracepos = QPoint() return