This commit is contained in:
恍兮惚兮 2024-08-28 21:54:28 +08:00
parent bc140686cd
commit 2d26b27b0e

View File

@ -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())