- re-added the position labels in the status bar; they will be useful if HUD is Off (Altium does the same :) so learn from the best)
This commit is contained in:
parent
3a337212f0
commit
d739a5b05d
@ -21,6 +21,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
- fix issue in Legacy2D graphic mode where the snap function was not accessible when the PlotCanvasLegacy class was created
|
- fix issue in Legacy2D graphic mode where the snap function was not accessible when the PlotCanvasLegacy class was created
|
||||||
- modified the HUD in Legacy2D when using Dark Theme to use different colors
|
- modified the HUD in Legacy2D when using Dark Theme to use different colors
|
||||||
- modified how the graphic engine change act in Preferences: now only by clicking Apply(or Save) the change will happen. And there is also a message asking for confirmation
|
- modified how the graphic engine change act in Preferences: now only by clicking Apply(or Save) the change will happen. And there is also a message asking for confirmation
|
||||||
|
- re-added the position labels in the status bar; they will be useful if HUD is Off (Altium does the same :) so learn from the best)
|
||||||
|
|
||||||
10.05.2020
|
10.05.2020
|
||||||
|
|
||||||
|
@ -3480,7 +3480,7 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
# delete the absolute and relative position and messages in the infobar
|
# delete the absolute and relative position and messages in the infobar
|
||||||
self.ui.position_label.setText("")
|
self.ui.position_label.setText("")
|
||||||
self.ui.rel_position_label.setText("")
|
# self.ui.rel_position_label.setText("")
|
||||||
|
|
||||||
# Switch plot_area to preferences page
|
# Switch plot_area to preferences page
|
||||||
self.ui.plot_tab_area.setCurrentWidget(self.book_dialog_tab)
|
self.ui.plot_tab_area.setCurrentWidget(self.book_dialog_tab)
|
||||||
@ -5386,8 +5386,8 @@ class App(QtCore.QObject):
|
|||||||
# Set the relative position label
|
# Set the relative position label
|
||||||
dx = location[0] - float(self.rel_point1[0])
|
dx = location[0] - float(self.rel_point1[0])
|
||||||
dy = location[1] - float(self.rel_point1[1])
|
dy = location[1] - float(self.rel_point1[1])
|
||||||
# self.ui.position_label.setText(" <b>X</b>: %.4f "
|
self.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||||
# "<b>Y</b>: %.4f" % (location[0], location[1]))
|
"<b>Y</b>: %.4f " % (location[0], location[1]))
|
||||||
# # Set the position label
|
# # Set the position label
|
||||||
#
|
#
|
||||||
# self.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
# self.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||||
@ -5542,8 +5542,8 @@ class App(QtCore.QObject):
|
|||||||
self.dx = location[0] - float(self.rel_point1[0])
|
self.dx = location[0] - float(self.rel_point1[0])
|
||||||
self.dy = location[1] - float(self.rel_point1[1])
|
self.dy = location[1] - float(self.rel_point1[1])
|
||||||
# Set the position label
|
# Set the position label
|
||||||
# self.ui.position_label.setText(" <b>X</b>: %.4f "
|
self.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||||
# "<b>Y</b>: %.4f" % (location[0], location[1]))
|
"<b>Y</b>: %.4f " % (location[0], location[1]))
|
||||||
# self.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
# self.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||||
# "%.4f " % (self.dx, self.dy))
|
# "%.4f " % (self.dx, self.dy))
|
||||||
|
|
||||||
@ -5859,7 +5859,7 @@ class App(QtCore.QObject):
|
|||||||
self.ui.plot_tab_area.addTab(self.ui.preferences_tab, _("Preferences"))
|
self.ui.plot_tab_area.addTab(self.ui.preferences_tab, _("Preferences"))
|
||||||
|
|
||||||
# delete the absolute and relative position and messages in the infobar
|
# delete the absolute and relative position and messages in the infobar
|
||||||
# self.ui.position_label.setText("")
|
self.ui.position_label.setText("")
|
||||||
# self.ui.rel_position_label.setText("")
|
# self.ui.rel_position_label.setText("")
|
||||||
|
|
||||||
# Switch plot_area to preferences page
|
# Switch plot_area to preferences page
|
||||||
@ -5957,7 +5957,7 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
# delete the absolute and relative position and messages in the infobar
|
# delete the absolute and relative position and messages in the infobar
|
||||||
self.ui.position_label.setText("")
|
self.ui.position_label.setText("")
|
||||||
self.ui.rel_position_label.setText("")
|
# self.ui.rel_position_label.setText("")
|
||||||
|
|
||||||
# Switch plot_area to preferences page
|
# Switch plot_area to preferences page
|
||||||
self.ui.plot_tab_area.setCurrentWidget(self.tools_db_tab)
|
self.ui.plot_tab_area.setCurrentWidget(self.tools_db_tab)
|
||||||
@ -6623,7 +6623,7 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
# delete the absolute and relative position and messages in the infobar
|
# delete the absolute and relative position and messages in the infobar
|
||||||
self.ui.position_label.setText("")
|
self.ui.position_label.setText("")
|
||||||
self.ui.rel_position_label.setText("")
|
# self.ui.rel_position_label.setText("")
|
||||||
|
|
||||||
# Switch plot_area to preferences page
|
# Switch plot_area to preferences page
|
||||||
self.ui.plot_tab_area.setCurrentWidget(self.ui.shortcuts_tab)
|
self.ui.plot_tab_area.setCurrentWidget(self.ui.shortcuts_tab)
|
||||||
@ -6771,8 +6771,8 @@ class App(QtCore.QObject):
|
|||||||
self.dx = pos[0] - float(self.rel_point1[0])
|
self.dx = pos[0] - float(self.rel_point1[0])
|
||||||
self.dy = pos[1] - float(self.rel_point1[1])
|
self.dy = pos[1] - float(self.rel_point1[1])
|
||||||
|
|
||||||
# self.ui.position_label.setText(" <b>X</b>: %.4f "
|
self.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||||
# "<b>Y</b>: %.4f" % (pos[0], pos[1]))
|
"<b>Y</b>: %.4f " % (pos[0], pos[1]))
|
||||||
# self.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
# self.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||||
# "%.4f " % (self.dx, self.dy))
|
# "%.4f " % (self.dx, self.dy))
|
||||||
|
|
||||||
@ -6831,7 +6831,7 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug("App.on_mouse_move_over_plot() - rel_point1 is not None -> %s" % str(e))
|
log.debug("App.on_mouse_move_over_plot() - rel_point1 is not None -> %s" % str(e))
|
||||||
# self.ui.position_label.setText("")
|
self.ui.position_label.setText("")
|
||||||
# self.ui.rel_position_label.setText("")
|
# self.ui.rel_position_label.setText("")
|
||||||
self.mouse = None
|
self.mouse = None
|
||||||
|
|
||||||
@ -8142,7 +8142,7 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
# delete the absolute and relative position and messages in the infobar
|
# delete the absolute and relative position and messages in the infobar
|
||||||
self.ui.position_label.setText("")
|
self.ui.position_label.setText("")
|
||||||
self.ui.rel_position_label.setText("")
|
# self.ui.rel_position_label.setText("")
|
||||||
|
|
||||||
# first clear previous text in text editor (if any)
|
# first clear previous text in text editor (if any)
|
||||||
self.text_editor_tab.code_editor.clear()
|
self.text_editor_tab.code_editor.clear()
|
||||||
@ -8193,7 +8193,7 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
# delete the absolute and relative position and messages in the infobar
|
# delete the absolute and relative position and messages in the infobar
|
||||||
self.ui.position_label.setText("")
|
self.ui.position_label.setText("")
|
||||||
self.ui.rel_position_label.setText("")
|
# self.ui.rel_position_label.setText("")
|
||||||
|
|
||||||
# first clear previous text in text editor (if any)
|
# first clear previous text in text editor (if any)
|
||||||
self.source_editor_tab.code_editor.clear()
|
self.source_editor_tab.code_editor.clear()
|
||||||
@ -8317,7 +8317,7 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
# delete the absolute and relative position and messages in the infobar
|
# delete the absolute and relative position and messages in the infobar
|
||||||
self.ui.position_label.setText("")
|
self.ui.position_label.setText("")
|
||||||
self.ui.rel_position_label.setText("")
|
# self.ui.rel_position_label.setText("")
|
||||||
|
|
||||||
self.new_script_object()
|
self.new_script_object()
|
||||||
|
|
||||||
|
@ -471,8 +471,8 @@ class ExclusionAreas(QtCore.QObject):
|
|||||||
|
|
||||||
self.app.dx = curr_pos[0] - float(self.cursor_pos[0])
|
self.app.dx = curr_pos[0] - float(self.cursor_pos[0])
|
||||||
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
||||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||||
# "<b>Y</b>: %.4f" % (curr_pos[0], curr_pos[1]))
|
"<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||||
# "%.4f " % (self.app.dx, self.app.dy))
|
# "%.4f " % (self.app.dx, self.app.dy))
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ class MyApp(QtCore.QObject):
|
|||||||
# we don't need all the info in the tuple returned by the translate_coords()
|
# we don't need all the info in the tuple returned by the translate_coords()
|
||||||
# only first 2 elements
|
# only first 2 elements
|
||||||
pos_canvas = [pos_canvas[0], pos_canvas[1]]
|
pos_canvas = [pos_canvas[0], pos_canvas[1]]
|
||||||
# self.ui.position_label.setText("Position: X: %.4f\tY: %.4f" % (pos_canvas[0], pos_canvas[1]))
|
self.ui.position_label.setText("Position: X: %.4f\tY: %.4f" % (pos_canvas[0], pos_canvas[1]))
|
||||||
# pos_text = 'Coordinates: \nX: {:<7.4f}\nY: {:<7.4f}'.format(pos_canvas[0], pos_canvas[1])
|
# pos_text = 'Coordinates: \nX: {:<7.4f}\nY: {:<7.4f}'.format(pos_canvas[0], pos_canvas[1])
|
||||||
pos_text = 'Coordinates: \nX: {:<.4f}\nY: {:<.4f}'.format(pos_canvas[0], pos_canvas[1])
|
pos_text = 'Coordinates: \nX: {:<.4f}\nY: {:<.4f}'.format(pos_canvas[0], pos_canvas[1])
|
||||||
self.plot.vispy_canvas.text.text = pos_text
|
self.plot.vispy_canvas.text.text = pos_text
|
||||||
|
@ -3782,8 +3782,8 @@ class FlatCAMExcEditor(QtCore.QObject):
|
|||||||
self.app.dy = y - self.pos[1]
|
self.app.dy = y - self.pos[1]
|
||||||
|
|
||||||
# # update the position label in the infobar since the APP mouse event handlers are disconnected
|
# # update the position label in the infobar since the APP mouse event handlers are disconnected
|
||||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||||
# "<b>Y</b>: %.4f" % (x, y))
|
"<b>Y</b>: %.4f " % (x, y))
|
||||||
# # update the reference position label in the infobar since the APP mouse event handlers are disconnected
|
# # update the reference position label in the infobar since the APP mouse event handlers are disconnected
|
||||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||||
# "%.4f " % (self.app.dx, self.app.dy))
|
# "%.4f " % (self.app.dx, self.app.dy))
|
||||||
|
@ -4255,8 +4255,8 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
|||||||
self.app.dy = y - self.pos[1]
|
self.app.dy = y - self.pos[1]
|
||||||
|
|
||||||
# # update the position label in the infobar since the APP mouse event handlers are disconnected
|
# # update the position label in the infobar since the APP mouse event handlers are disconnected
|
||||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||||
# "<b>Y</b>: %.4f" % (x, y))
|
"<b>Y</b>: %.4f " % (x, y))
|
||||||
#
|
#
|
||||||
# # update the reference position label in the infobar since the APP mouse event handlers are disconnected
|
# # update the reference position label in the infobar since the APP mouse event handlers are disconnected
|
||||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||||
|
@ -4755,8 +4755,8 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||||||
self.app.dy = y - self.pos[1]
|
self.app.dy = y - self.pos[1]
|
||||||
|
|
||||||
# # update the position label in the infobar since the APP mouse event handlers are disconnected
|
# # update the position label in the infobar since the APP mouse event handlers are disconnected
|
||||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||||
# "<b>Y</b>: %.4f" % (x, y))
|
"<b>Y</b>: %.4f " % (x, y))
|
||||||
#
|
#
|
||||||
# # update the reference position label in the infobar since the APP mouse event handlers are disconnected
|
# # update the reference position label in the infobar since the APP mouse event handlers are disconnected
|
||||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||||
|
@ -2309,11 +2309,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
# self.rel_position_label.setToolTip(_("Relative measurement.\nReference is last click position"))
|
# self.rel_position_label.setToolTip(_("Relative measurement.\nReference is last click position"))
|
||||||
# self.infobar.addWidget(self.rel_position_label)
|
# self.infobar.addWidget(self.rel_position_label)
|
||||||
#
|
#
|
||||||
# self.position_label = QtWidgets.QLabel(
|
self.position_label = QtWidgets.QLabel(
|
||||||
# " <b>X</b>: 0.0000 <b>Y</b>: 0.0000")
|
" <b>X</b>: 0.0000 <b>Y</b>: 0.0000 ")
|
||||||
# self.position_label.setMinimumWidth(110)
|
self.position_label.setMinimumWidth(110)
|
||||||
# self.position_label.setToolTip(_("Absolute measurement.\nReference is (X=0, Y= 0) position"))
|
self.position_label.setToolTip(_("Absolute measurement.\nReference is (X=0, Y= 0) position"))
|
||||||
# self.infobar.addWidget(self.position_label)
|
self.infobar.addWidget(self.position_label)
|
||||||
|
|
||||||
self.snap_toolbar.setMaximumHeight(24)
|
self.snap_toolbar.setMaximumHeight(24)
|
||||||
self.infobar.addWidget(self.snap_toolbar)
|
self.infobar.addWidget(self.snap_toolbar)
|
||||||
|
@ -564,7 +564,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
|||||||
|
|
||||||
# delete the absolute and relative position and messages in the infobar
|
# delete the absolute and relative position and messages in the infobar
|
||||||
self.app.ui.position_label.setText("")
|
self.app.ui.position_label.setText("")
|
||||||
self.app.ui.rel_position_label.setText("")
|
# self.app.ui.rel_position_label.setText("")
|
||||||
|
|
||||||
# first clear previous text in text editor (if any)
|
# first clear previous text in text editor (if any)
|
||||||
self.gcode_editor_tab.code_editor.clear()
|
self.gcode_editor_tab.code_editor.clear()
|
||||||
|
@ -1069,7 +1069,7 @@ class ToolCalibration(FlatCAMTool):
|
|||||||
|
|
||||||
# delete the absolute and relative position and messages in the infobar
|
# delete the absolute and relative position and messages in the infobar
|
||||||
self.app.ui.position_label.setText("")
|
self.app.ui.position_label.setText("")
|
||||||
self.app.ui.rel_position_label.setText("")
|
# self.app.ui.rel_position_label.setText("")
|
||||||
|
|
||||||
# first clear previous text in text editor (if any)
|
# first clear previous text in text editor (if any)
|
||||||
self.gcode_editor_tab.code_editor.clear()
|
self.gcode_editor_tab.code_editor.clear()
|
||||||
|
@ -917,8 +917,8 @@ class ToolCopperThieving(FlatCAMTool):
|
|||||||
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
||||||
|
|
||||||
# # update the positions on status bar
|
# # update the positions on status bar
|
||||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||||
# "<b>Y</b>: %.4f" % (curr_pos[0], curr_pos[1]))
|
"<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||||
# "%.4f " % (self.app.dx, self.app.dy))
|
# "%.4f " % (self.app.dx, self.app.dy))
|
||||||
|
|
||||||
|
@ -544,11 +544,11 @@ class Distance(FlatCAMTool):
|
|||||||
else:
|
else:
|
||||||
pos = (pos_canvas[0], pos_canvas[1])
|
pos = (pos_canvas[0], pos_canvas[1])
|
||||||
|
|
||||||
# self.app.ui.position_label.setText(
|
self.app.ui.position_label.setText(
|
||||||
# " <b>X</b>: {} <b>Y</b>: {}".format(
|
" <b>X</b>: {} <b>Y</b>: {}".format(
|
||||||
# '%.*f' % (self.decimals, pos[0]), '%.*f' % (self.decimals, pos[1])
|
'%.*f' % (self.decimals, pos[0]), '%.*f' % (self.decimals, pos[1])
|
||||||
# )
|
)
|
||||||
# )
|
)
|
||||||
|
|
||||||
units = self.app.defaults["units"].lower()
|
units = self.app.defaults["units"].lower()
|
||||||
self.app.plotcanvas.text_hud.text = \
|
self.app.plotcanvas.text_hud.text = \
|
||||||
@ -583,7 +583,7 @@ class Distance(FlatCAMTool):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug("Distance.on_mouse_move_meas() --> %s" % str(e))
|
log.debug("Distance.on_mouse_move_meas() --> %s" % str(e))
|
||||||
self.app.ui.position_label.setText("")
|
self.app.ui.position_label.setText("")
|
||||||
self.app.ui.rel_position_label.setText("")
|
# self.app.ui.rel_position_label.setText("")
|
||||||
|
|
||||||
def utility_geometry(self, pos):
|
def utility_geometry(self, pos):
|
||||||
# first delete old shape
|
# first delete old shape
|
||||||
|
@ -1832,8 +1832,8 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||||||
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
||||||
|
|
||||||
# # update the positions on status bar
|
# # update the positions on status bar
|
||||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||||
# "<b>Y</b>: %.4f" % (curr_pos[0], curr_pos[1]))
|
"<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||||
# "%.4f " % (self.app.dx, self.app.dy))
|
# "%.4f " % (self.app.dx, self.app.dy))
|
||||||
|
|
||||||
|
@ -1731,8 +1731,8 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||||||
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
self.app.dy = curr_pos[1] - float(self.cursor_pos[1])
|
||||||
|
|
||||||
# # update the positions on status bar
|
# # update the positions on status bar
|
||||||
# self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
self.app.ui.position_label.setText(" <b>X</b>: %.4f "
|
||||||
# "<b>Y</b>: %.4f" % (curr_pos[0], curr_pos[1]))
|
"<b>Y</b>: %.4f " % (curr_pos[0], curr_pos[1]))
|
||||||
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
# self.app.ui.rel_position_label.setText("<b>Dx</b>: %.4f <b>Dy</b>: "
|
||||||
# "%.4f " % (self.app.dx, self.app.dy))
|
# "%.4f " % (self.app.dx, self.app.dy))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user