- made the Grid icon in the status bar clickable and it will toggle the snap to grid function
This commit is contained in:
@@ -1417,9 +1417,19 @@ class FCButton(QtWidgets.QPushButton):
|
||||
|
||||
|
||||
class FCLabel(QtWidgets.QLabel):
|
||||
|
||||
clicked = QtCore.pyqtSignal(bool)
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(FCLabel, self).__init__(parent)
|
||||
|
||||
# for the usage of this label as a clickable label, to know that current state
|
||||
self.clicked_state = False
|
||||
|
||||
def mousePressEvent(self, ev: QtGui.QMouseEvent) -> None:
|
||||
self.clicked_state = not self.clicked_state
|
||||
self.clicked.emit(self.clicked_state)
|
||||
|
||||
def get_value(self):
|
||||
return self.text()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user