mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44: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()))
|
winsharedutils.maximum_window(int(self.winId()))
|
||||||
# desktop = QApplication.primaryScreen().virtualGeometry()
|
# desktop = QApplication.primaryScreen().virtualGeometry()
|
||||||
# self.setGeometry(desktop)
|
# self.setGeometry(desktop)
|
||||||
|
self.once = True
|
||||||
self.is_drawing = False
|
self.is_drawing = False
|
||||||
self.start_point = QPoint()
|
self.start_point = QPoint()
|
||||||
self.end_point = QPoint()
|
self.end_point = QPoint()
|
||||||
@ -192,6 +193,9 @@ class rangeselect(QMainWindow):
|
|||||||
|
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
if not self.once:
|
||||||
|
return
|
||||||
|
self.once = False
|
||||||
self.callback(self.getRange())
|
self.callback(self.getRange())
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@ -260,6 +264,9 @@ class rangeselect(QMainWindow):
|
|||||||
self.__end = windows.GetCursorPos()
|
self.__end = windows.GetCursorPos()
|
||||||
|
|
||||||
self.close()
|
self.close()
|
||||||
|
if not self.once:
|
||||||
|
return
|
||||||
|
self.once = False
|
||||||
self.callback(self.getRange())
|
self.callback(self.getRange())
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user