mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
fix
This commit is contained in:
parent
bc140686cd
commit
2d26b27b0e
@ -174,6 +174,7 @@ class rangeselect(QMainWindow):
|
||||
winsharedutils.maximum_window(int(self.winId()))
|
||||
# desktop = QApplication.primaryScreen().virtualGeometry()
|
||||
# self.setGeometry(desktop)
|
||||
self.once = True
|
||||
self.is_drawing = False
|
||||
self.start_point = QPoint()
|
||||
self.end_point = QPoint()
|
||||
@ -192,6 +193,9 @@ class rangeselect(QMainWindow):
|
||||
|
||||
self.close()
|
||||
|
||||
if not self.once:
|
||||
return
|
||||
self.once = False
|
||||
self.callback(self.getRange())
|
||||
except:
|
||||
pass
|
||||
@ -260,6 +264,9 @@ class rangeselect(QMainWindow):
|
||||
self.__end = windows.GetCursorPos()
|
||||
|
||||
self.close()
|
||||
if not self.once:
|
||||
return
|
||||
self.once = False
|
||||
self.callback(self.getRange())
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user