- made sure that clicking the icons in the status bar works only for the left mouse click
- if clicking the activity icon in the status bar and there is no object selected then the effect will be a plot_all with fit_view - modified the FCLabel GUI element
This commit is contained in:
parent
e4aafdba9b
commit
6db5def032
|
@ -7,6 +7,12 @@ CHANGELOG for FlatCAM beta
|
||||||
|
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
|
14.06.2020
|
||||||
|
|
||||||
|
- made sure that clicking the icons in the status bar works only for the left mouse click
|
||||||
|
- if clicking the activity icon in the status bar and there is no object selected then the effect will be a plot_all with fit_view
|
||||||
|
- modified the FCLabel GUI element
|
||||||
|
|
||||||
13.06.2020
|
13.06.2020
|
||||||
|
|
||||||
- modified the Tools Database such that there is now a way to mark a tool as meant to be used in a certain part of the application; it will disable or enable parts of the parameters of the tool
|
- modified the Tools Database such that there is now a way to mark a tool as meant to be used in a certain part of the application; it will disable or enable parts of the parameters of the tool
|
||||||
|
|
|
@ -1565,16 +1565,27 @@ class FCButton(QtWidgets.QPushButton):
|
||||||
class FCLabel(QtWidgets.QLabel):
|
class FCLabel(QtWidgets.QLabel):
|
||||||
|
|
||||||
clicked = QtCore.pyqtSignal(bool)
|
clicked = QtCore.pyqtSignal(bool)
|
||||||
|
right_clicked = QtCore.pyqtSignal(bool)
|
||||||
|
middle_clicked = QtCore.pyqtSignal(bool)
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(FCLabel, self).__init__(parent)
|
super(FCLabel, self).__init__(parent)
|
||||||
|
|
||||||
# for the usage of this label as a clickable label, to know that current state
|
# for the usage of this label as a clickable label, to know that current state
|
||||||
self.clicked_state = False
|
self.clicked_state = False
|
||||||
|
self.middle_clicked_state = False
|
||||||
|
self.right_clicked_state = False
|
||||||
|
|
||||||
def mousePressEvent(self, event):
|
def mousePressEvent(self, event):
|
||||||
self.clicked_state = not self.clicked_state
|
if event.button() == Qt.LeftButton:
|
||||||
self.clicked.emit(self.clicked_state)
|
self.clicked_state = not self.clicked_state
|
||||||
|
self.clicked.emit(self.clicked_state)
|
||||||
|
elif event.button() == Qt.RightButton:
|
||||||
|
self.right_clicked_state = not self.right_clicked_state
|
||||||
|
self.right_clicked.emit(True)
|
||||||
|
elif event.button() == Qt.MiddleButton:
|
||||||
|
self.middle_clicked_state = not self.middle_clicked_state
|
||||||
|
self.middle_clicked.emit(True)
|
||||||
|
|
||||||
def get_value(self):
|
def get_value(self):
|
||||||
return self.text()
|
return self.text()
|
||||||
|
|
10
app_Main.py
10
app_Main.py
|
@ -5778,9 +5778,13 @@ class App(QtCore.QObject):
|
||||||
self.log.debug("on_toolbar_replot()")
|
self.log.debug("on_toolbar_replot()")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.collection.get_active().read_form()
|
obj = self.collection.get_active()
|
||||||
except AttributeError:
|
if obj:
|
||||||
self.log.debug("on_toolbar_replot(): AttributeError")
|
obj.read_form()
|
||||||
|
else:
|
||||||
|
self.on_zoom_fit()
|
||||||
|
except AttributeError as e:
|
||||||
|
log.debug("on_toolbar_replot() -> %s" % str(e))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
self.plot_all()
|
self.plot_all()
|
||||||
|
|
Loading…
Reference in New Issue