- removed the labels in status bar that display X,Y positions and replaced it with a HUD display on canvas (combo key SHIFT+H) will toggle the display of the HUD

- made the HUD work in Legacy2D mode
- fixed situation when the mouse cursor is outside of the canvas and no therefore returning None values
This commit is contained in:
Marius Stanciu
2020-05-11 07:29:46 +03:00
committed by Marius
parent f81be6f0a9
commit 46367c433f
16 changed files with 453 additions and 80 deletions

View File

@@ -2306,17 +2306,17 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
self.snap_infobar_label.setPixmap(QtGui.QPixmap(self.app.resource_location + '/snap_16.png'))
self.infobar.addWidget(self.snap_infobar_label)
self.rel_position_label = QtWidgets.QLabel(
"<b>Dx</b>: 0.0000&nbsp;&nbsp; <b>Dy</b>: 0.0000&nbsp;&nbsp;&nbsp;&nbsp;")
self.rel_position_label.setMinimumWidth(110)
self.rel_position_label.setToolTip(_("Relative measurement.\nReference is last click position"))
self.infobar.addWidget(self.rel_position_label)
self.position_label = QtWidgets.QLabel(
"&nbsp;&nbsp;&nbsp;&nbsp;<b>X</b>: 0.0000&nbsp;&nbsp; <b>Y</b>: 0.0000")
self.position_label.setMinimumWidth(110)
self.position_label.setToolTip(_("Absolute measurement.\nReference is (X=0, Y= 0) position"))
self.infobar.addWidget(self.position_label)
# self.rel_position_label = QtWidgets.QLabel(
# "<b>Dx</b>: 0.0000&nbsp;&nbsp; <b>Dy</b>: 0.0000&nbsp;&nbsp;&nbsp;&nbsp;")
# self.rel_position_label.setMinimumWidth(110)
# self.rel_position_label.setToolTip(_("Relative measurement.\nReference is last click position"))
# self.infobar.addWidget(self.rel_position_label)
#
# self.position_label = QtWidgets.QLabel(
# "&nbsp;&nbsp;&nbsp;&nbsp;<b>X</b>: 0.0000&nbsp;&nbsp; <b>Y</b>: 0.0000")
# self.position_label.setMinimumWidth(110)
# self.position_label.setToolTip(_("Absolute measurement.\nReference is (X=0, Y= 0) position"))
# self.infobar.addWidget(self.position_label)
self.units_label = QtWidgets.QLabel("[in]")
self.units_label.setMargin(2)
@@ -2993,6 +2993,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
if key == QtCore.Qt.Key_G:
self.app.on_toggle_axis()
# Toggle HUD (Heads-Up Display)
if key == QtCore.Qt.Key_H:
state = False if self.app.plotcanvas.hud_enabled else True
self.app.plotcanvas.on_toggle_hud(state=state)
# Locate in Object
if key == QtCore.Qt.Key_J:
self.app.on_locate(obj=self.app.collection.get_active())