- 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:
@@ -544,11 +544,16 @@ class Distance(FlatCAMTool):
|
||||
else:
|
||||
pos = (pos_canvas[0], pos_canvas[1])
|
||||
|
||||
self.app.ui.position_label.setText(
|
||||
" <b>X</b>: {} <b>Y</b>: {}".format(
|
||||
'%.*f' % (self.decimals, pos[0]), '%.*f' % (self.decimals, pos[1])
|
||||
)
|
||||
)
|
||||
# self.app.ui.position_label.setText(
|
||||
# " <b>X</b>: {} <b>Y</b>: {}".format(
|
||||
# '%.*f' % (self.decimals, pos[0]), '%.*f' % (self.decimals, pos[1])
|
||||
# )
|
||||
# )
|
||||
|
||||
units = self.app.defaults["units"].lower()
|
||||
self.plotcanvas.text_hud.text = \
|
||||
'Dx:\t{:<.4f} [{:s}]\nDy:\t{:<.4f} [{:s}]\nX: \t{:<.4f} [{:s}]\nY: \t{:<.4f} [{:s}]'.format(
|
||||
0.0000, units, 0.0000, units, pos[0], units, pos[1], units)
|
||||
|
||||
if self.rel_point1 is not None:
|
||||
dx = pos[0] - float(self.rel_point1[0])
|
||||
|
||||
Reference in New Issue
Block a user