Revert "Preferences refactoring (pull request #309)"
This commit is contained in:
@@ -910,22 +910,16 @@ class ToolCopperThieving(FlatCAMTool):
|
||||
edge_width=self.app.defaults["global_cursor_width"],
|
||||
size=self.app.defaults["global_cursor_size"])
|
||||
|
||||
# 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]))
|
||||
if self.cursor_pos is None:
|
||||
self.cursor_pos = (0, 0)
|
||||
|
||||
self.app.dx = curr_pos[0] - float(self.cursor_pos[0])
|
||||
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))
|
||||
|
||||
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(
|
||||
self.app.dx, units, self.app.dy, units, curr_pos[0], units, curr_pos[1], units)
|
||||
self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
"%.4f " % (self.app.dx, self.app.dy))
|
||||
|
||||
# draw the utility geometry
|
||||
if self.first_click:
|
||||
|
||||
@@ -544,16 +544,11 @@ 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])
|
||||
# )
|
||||
# )
|
||||
|
||||
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)
|
||||
self.app.ui.position_label.setText(
|
||||
" <b>X</b>: {} <b>Y</b>: {}".format(
|
||||
'%.*f' % (self.decimals, pos[0]), '%.*f' % (self.decimals, pos[1])
|
||||
)
|
||||
)
|
||||
|
||||
if self.rel_point1 is not None:
|
||||
dx = pos[0] - float(self.rel_point1[0])
|
||||
|
||||
@@ -1825,22 +1825,16 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
||||
edge_width=self.app.defaults["global_cursor_width"],
|
||||
size=self.app.defaults["global_cursor_size"])
|
||||
|
||||
# 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]))
|
||||
if self.cursor_pos is None:
|
||||
self.cursor_pos = (0, 0)
|
||||
|
||||
self.app.dx = curr_pos[0] - float(self.cursor_pos[0])
|
||||
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))
|
||||
|
||||
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(
|
||||
self.app.dx, units, self.app.dy, units, curr_pos[0], units, curr_pos[1], units)
|
||||
self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
"%.4f " % (self.app.dx, self.app.dy))
|
||||
|
||||
# draw the utility geometry
|
||||
if shape_type == "square":
|
||||
|
||||
@@ -1724,22 +1724,16 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||
edge_width=self.app.defaults["global_cursor_width"],
|
||||
size=self.app.defaults["global_cursor_size"])
|
||||
|
||||
# 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]))
|
||||
if self.cursor_pos is None:
|
||||
self.cursor_pos = (0, 0)
|
||||
|
||||
self.app.dx = curr_pos[0] - float(self.cursor_pos[0])
|
||||
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))
|
||||
|
||||
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(
|
||||
self.app.dx, units, self.app.dy, units, curr_pos[0], units, curr_pos[1], units)
|
||||
self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||
"%.4f " % (self.app.dx, self.app.dy))
|
||||
|
||||
# draw the utility geometry
|
||||
if shape_type == "square":
|
||||
|
||||
Reference in New Issue
Block a user