- in Autolevelling Plugin, preventing the add of a probe point on Excellon hole checkbox is not disabled except for the Manual mode

- in Autolevelling Plugin, the status of soem checkoxes (avoid Excellon holes and plot points) is stored between app restarts
- in Isolation Plugin, added an convenience shortcut button to launch the Milling Plugin.
This commit is contained in:
Marius Stanciu
2023-01-18 18:22:33 +02:00
parent c85d04bc0a
commit 9ce9c3cb54
3 changed files with 26 additions and 5 deletions

View File

@@ -3964,6 +3964,9 @@ class IsoUI:
# #############################################################################################################
# Generate Geometry object
# #############################################################################################################
gen_hlay = QtWidgets.QHBoxLayout()
self.tools_box.addLayout(gen_hlay)
self.generate_iso_button = FCButton("%s" % _("Generate Geometry"), bold=True)
self.generate_iso_button.setIcon(QtGui.QIcon(self.app.resource_location + '/geometry32.png'))
self.generate_iso_button.setToolTip(
@@ -3977,7 +3980,15 @@ class IsoUI:
"inside the actual Gerber feature, use a negative tool\n"
"diameter above.")
)
self.tools_box.addWidget(self.generate_iso_button)
gen_hlay.addWidget(self.generate_iso_button, stretch=1)
# Milling Plugin shortcut
self.milling_button = QtWidgets.QToolButton()
self.milling_button.setIcon(QtGui.QIcon(self.app.resource_location + '/milling_tool32.png'))
self.milling_button.setToolTip(
_("Generate a CNCJob by milling a Geometry.")
)
gen_hlay.addWidget(self.milling_button)
self.create_buffer_button = FCButton(_('Buffer Solid Geometry'))
self.create_buffer_button.setToolTip(
@@ -4000,6 +4011,8 @@ class IsoUI:
# ############################ FINSIHED GUI ###################################
# #############################################################################
self.milling_button.clicked.connect(lambda: self.app.milling_tool.run())
def confirmation_message(self, accepted, minval, maxval):
if accepted is False:
self.app.inform[str, bool].emit('[WARNING_NOTCL] %s: [%.*f, %.*f]' % (_("Edited value is out of range"),

View File

@@ -269,6 +269,9 @@ class ToolLevelling(AppTool, CNCjob):
self.to_form()
self.on_controller_change_alter_ui()
self.ui.plot_probing_pts_cb.set_value(self.app.options["tools_al_plot_points"])
self.ui.avoid_exc_holes_cb.set_value(self.app.options["tools_al_avoid_exc_holes"])
self.ui.al_probe_points_table.setRowCount(0)
self.ui.al_probe_points_table.resizeColumnsToContents()
self.ui.al_probe_points_table.resizeRowsToContents()
@@ -1041,6 +1044,7 @@ class ToolLevelling(AppTool, CNCjob):
self.ui.al_columns_label.setDisabled(True)
self.ui.al_method_lbl.setDisabled(True)
self.ui.al_method_radio.setDisabled(True)
self.ui.avoid_exc_holes_cb.setDisabled(False)
else:
self.ui.al_rows_entry.setDisabled(False)
self.ui.al_rows_label.setDisabled(False)
@@ -1049,6 +1053,7 @@ class ToolLevelling(AppTool, CNCjob):
self.ui.al_method_lbl.setDisabled(False)
self.ui.al_method_radio.setDisabled(False)
self.ui.al_method_radio.set_value(self.app.options['tools_al_method'])
self.ui.avoid_exc_holes_cb.setDisabled(True)
def on_method_radio(self, val):
if val == 'b':
@@ -2405,7 +2410,7 @@ class LevelUI:
self.app.inform[str, bool].emit('[success] %s' % _("Edited value is within limits."), False)
def on_plot_points_changed(self, state):
self.app.defaults["tools_al_plot_points"] = False if not state else True
self.app.options["tools_al_plot_points"] = False if not state else True
def on_avoid_exc_holes_changed(self, state):
self.app.defaults["tools_al_avoid_exc_holes"] = False if not state else True
self.app.options["tools_al_avoid_exc_holes"] = False if not state else True