Просмотр исходного кода

- some changed in the Excellon UI

Marius Stanciu 6 лет назад
Родитель
Сommit
a44d7b97b5
3 измененных файлов с 15 добавлено и 3 удалено
  1. 12 1
      FlatCAMObj.py
  2. 1 0
      README.md
  3. 2 2
      flatcamGUI/ObjectUI.py

+ 12 - 1
FlatCAMObj.py

@@ -2868,7 +2868,18 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
             sel_rows = row if type(row) == list else [row]
             sel_rows = row if type(row) == list else [row]
 
 
         if not sel_rows:
         if not sel_rows:
-            sel_rows = [0]
+            self.ui.tool_data_label.setText(
+                "<b>%s: <font color='#0000FF'>%s</font></b>" % (_('Parameters for'), _("No Tool Selected"))
+            )
+            self.ui.generate_cnc_button.setDisabled(True)
+            self.ui.generate_milling_button.setDisabled(True)
+            self.ui.generate_milling_slots_button.setDisabled(True)
+            self.ui_connect()
+            return
+        else:
+            self.ui.generate_cnc_button.setDisabled(False)
+            self.ui.generate_milling_button.setDisabled(False)
+            self.ui.generate_milling_slots_button.setDisabled(False)
 
 
         if len(sel_rows) == 1:
         if len(sel_rows) == 1:
             # update the QLabel that shows for which Tool we have the parameters in the UI form
             # update the QLabel that shows for which Tool we have the parameters in the UI form

+ 1 - 0
README.md

@@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing.
 30.01.2020
 30.01.2020
 
 
 - remade GUI in Tool Cutout, Tool Align Objects, Tool Panelize
 - remade GUI in Tool Cutout, Tool Align Objects, Tool Panelize
+- some changed in the Excellon UI
 
 
 29.01.2020
 29.01.2020
 
 

+ 2 - 2
flatcamGUI/ObjectUI.py

@@ -1248,7 +1248,7 @@ class ExcellonObjectUI(ObjectUI):
         warning_lbl = QtWidgets.QLabel(
         warning_lbl = QtWidgets.QLabel(
             _(
             _(
                 "Add / Select at least one tool in the tool-table.\n"
                 "Add / Select at least one tool in the tool-table.\n"
-                "Click the header to select all, or Ctrl + LMB\n"
+                "Click the # header to select all, or Ctrl + LMB\n"
                 "for custom selection of tools."
                 "for custom selection of tools."
             ))
             ))
 
 
@@ -1946,7 +1946,7 @@ class GeometryObjectUI(ObjectUI):
         warning_lbl = QtWidgets.QLabel(
         warning_lbl = QtWidgets.QLabel(
             _(
             _(
                 "Add / Select at least one tool in the tool-table.\n"
                 "Add / Select at least one tool in the tool-table.\n"
-                "Click the header to select all, or Ctrl + LMB\n"
+                "Click the # header to select all, or Ctrl + LMB\n"
                 "for custom selection of tools."
                 "for custom selection of tools."
             ))
             ))
         self.grid4.addWidget(warning_lbl, 6, 0, 1, 2)
         self.grid4.addWidget(warning_lbl, 6, 0, 1, 2)