- made sure that the location labels in the InfoBar have only the decimals required when the Grid snapping is ON
This commit is contained in:
@@ -512,10 +512,11 @@ class ToolCopperThieving(AppTool):
|
||||
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
||||
|
||||
# # update the positions on status bar
|
||||
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||
"<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||
self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
"%.4f " % (self.app.dx, self.app.dy))
|
||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||
# "<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
# "%.4f " % (self.app.dx, self.app.dy))
|
||||
self.app.ui.update_location_labels(self.app.dx, self.app.dy, curr_pos[0], curr_pos[1])
|
||||
|
||||
units = self.app.defaults["units"].lower()
|
||||
# self.app.plotcanvas.text_hud.text = \
|
||||
|
||||
@@ -481,11 +481,12 @@ class Distance(AppTool):
|
||||
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])
|
||||
# )
|
||||
# )
|
||||
self.app.ui.update_location_labels(dx=None, dy=None, x=pos[0], y=pos[1])
|
||||
|
||||
units = self.app.defaults["units"].lower()
|
||||
# self.app.plotcanvas.text_hud.text = \
|
||||
|
||||
@@ -578,10 +578,11 @@ class ToolFollow(AppTool, Gerber):
|
||||
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
||||
|
||||
# # update the positions on status bar
|
||||
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||
"<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||
self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
"%.4f " % (self.app.dx, self.app.dy))
|
||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||
# "<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
# "%.4f " % (self.app.dx, self.app.dy))
|
||||
self.app.ui.update_location_labels(self.app.dx, self.app.dy, curr_pos[0], curr_pos[1])
|
||||
|
||||
units = self.app.defaults["units"].lower()
|
||||
# self.app.plotcanvas.text_hud.text = \
|
||||
|
||||
@@ -2650,10 +2650,11 @@ class ToolIsolation(AppTool, Gerber):
|
||||
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
||||
|
||||
# # update the positions on status bar
|
||||
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||
"<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||
self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
"%.4f " % (self.app.dx, self.app.dy))
|
||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||
# "<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
# "%.4f " % (self.app.dx, self.app.dy))
|
||||
self.app.ui.update_location_labels(self.app.dx, self.app.dy, curr_pos[0], curr_pos[1])
|
||||
|
||||
units = self.app.defaults["units"].lower()
|
||||
# self.app.plotcanvas.text_hud.text = \
|
||||
|
||||
@@ -1834,10 +1834,11 @@ class NonCopperClear(AppTool, Gerber):
|
||||
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
||||
|
||||
# # update the positions on status bar
|
||||
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||
"<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||
self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
"%.4f " % (self.app.dx, self.app.dy))
|
||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||
# "<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
# "%.4f " % (self.app.dx, self.app.dy))
|
||||
self.app.ui.update_location_labels(self.app.dx, self.app.dy, curr_pos[0], curr_pos[1])
|
||||
|
||||
units = self.app.defaults["units"].lower()
|
||||
# self.app.plotcanvas.text_hud.text = \
|
||||
|
||||
@@ -1503,10 +1503,11 @@ class ToolPaint(AppTool, Gerber):
|
||||
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
||||
|
||||
# # update the positions on status bar
|
||||
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||
"<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||
self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
"%.4f " % (self.app.dx, self.app.dy))
|
||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||
# "<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
# "%.4f " % (self.app.dx, self.app.dy))
|
||||
self.app.ui.update_location_labels(self.app.dx, self.app.dy, curr_pos[0], curr_pos[1])
|
||||
|
||||
units = self.app.defaults["units"].lower()
|
||||
# self.app.plotcanvas.text_hud.text = \
|
||||
|
||||
Reference in New Issue
Block a user