Browse Source

- wip for Tool Drilling

Marius Stanciu 5 năm trước cách đây
mục cha
commit
315ab77ebe
2 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 1 0
      CHANGELOG.md
  2. 5 1
      appTools/ToolDrilling.py

+ 1 - 0
CHANGELOG.md

@@ -10,6 +10,7 @@ CHANGELOG for FlatCAM beta
 25.06.2020
 25.06.2020
 
 
 - made sure that when trying to view the source but no object is selected, the messages are correct
 - made sure that when trying to view the source but no object is selected, the messages are correct
+- wip for Tool Drilling
 
 
 23.06.2020
 23.06.2020
 
 

+ 5 - 1
appTools/ToolDrilling.py

@@ -190,6 +190,7 @@ class ToolDrilling(AppTool, Excellon):
         self.on_object_changed()
         self.on_object_changed()
         self.set_tool_ui()
         self.set_tool_ui()
         self.build_ui()
         self.build_ui()
+
         # all the tools are selected by default
         # all the tools are selected by default
         self.ui.tools_table.selectAll()
         self.ui.tools_table.selectAll()
 
 
@@ -454,7 +455,7 @@ class ToolDrilling(AppTool, Excellon):
 
 
             # Find no of drills for the current tool
             # Find no of drills for the current tool
             try:
             try:
-                drill_cnt = len(self.excellon_tools[tool_no]["drills"]) # variable to store the nr of drills per tool
+                drill_cnt = len(self.excellon_tools[tool_no]["drills"])  # variable to store the nr of drills per tool
             except KeyError:
             except KeyError:
                 drill_cnt = 0
                 drill_cnt = 0
             tot_drill_cnt += drill_cnt
             tot_drill_cnt += drill_cnt
@@ -639,6 +640,7 @@ class ToolDrilling(AppTool, Excellon):
             )
             )
 
 
     def on_object_changed(self):
     def on_object_changed(self):
+        log.debug("ToolDrilling.on_object_changed()")
         # load the Excellon object
         # load the Excellon object
         self.obj_name = self.ui.object_combo.currentText()
         self.obj_name = self.ui.object_combo.currentText()
 
 
@@ -669,6 +671,8 @@ class ToolDrilling(AppTool, Excellon):
             self.ui.tool_data_label.setText(
             self.ui.tool_data_label.setText(
                 "<b>%s: <font color='#0000FF'>%s</font></b>" % (_('Parameters for'), _("No Tool Selected"))
                 "<b>%s: <font color='#0000FF'>%s</font></b>" % (_('Parameters for'), _("No Tool Selected"))
             )
             )
+        else:
+            self.ui.generate_cnc_button.setDisabled(False)
 
 
     def ui_connect(self):
     def ui_connect(self):