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

- made changes in the Excellon Tools Table to make it more clear that the tools are selected in the # column and not in the Plot column

Marius Stanciu 6 лет назад
Родитель
Сommit
625559555c
3 измененных файлов с 25 добавлено и 9 удалено
  1. 20 7
      FlatCAMObj.py
  2. 1 0
      README.md
  3. 4 2
      flatcamGUI/ObjectUI.py

+ 20 - 7
FlatCAMObj.py

@@ -1946,6 +1946,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
                 t_offset = self.app.defaults['excellon_offset']
                 t_offset = self.app.defaults['excellon_offset']
 
 
             tool_offset_item = QtWidgets.QTableWidgetItem('%s' % str(t_offset))
             tool_offset_item = QtWidgets.QTableWidgetItem('%s' % str(t_offset))
+            tool_offset_item.setFlags(QtCore.Qt.ItemIsEnabled)
 
 
             plot_item = FCCheckBox()
             plot_item = FCCheckBox()
             plot_item.setLayoutDirection(QtCore.Qt.RightToLeft)
             plot_item.setLayoutDirection(QtCore.Qt.RightToLeft)
@@ -1961,20 +1962,26 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
             self.tool_row += 1
             self.tool_row += 1
 
 
         # add a last row with the Total number of drills
         # add a last row with the Total number of drills
-        empty = QtWidgets.QTableWidgetItem('')
-        empty.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
         empty_1 = QtWidgets.QTableWidgetItem('')
         empty_1 = QtWidgets.QTableWidgetItem('')
         empty_1.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
         empty_1.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
+        empty_1_1 = QtWidgets.QTableWidgetItem('')
+        empty_1_1.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
+        empty_1_2 = QtWidgets.QTableWidgetItem('')
+        empty_1_2.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
+        empty_1_3 = QtWidgets.QTableWidgetItem('')
+        empty_1_3.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
 
 
         label_tot_drill_count = QtWidgets.QTableWidgetItem(_('Total Drills'))
         label_tot_drill_count = QtWidgets.QTableWidgetItem(_('Total Drills'))
         tot_drill_count = QtWidgets.QTableWidgetItem('%d' % self.tot_drill_cnt)
         tot_drill_count = QtWidgets.QTableWidgetItem('%d' % self.tot_drill_cnt)
         label_tot_drill_count.setFlags(QtCore.Qt.ItemIsEnabled)
         label_tot_drill_count.setFlags(QtCore.Qt.ItemIsEnabled)
         tot_drill_count.setFlags(QtCore.Qt.ItemIsEnabled)
         tot_drill_count.setFlags(QtCore.Qt.ItemIsEnabled)
 
 
-        self.ui.tools_table.setItem(self.tool_row, 0, empty)
+        self.ui.tools_table.setItem(self.tool_row, 0, empty_1)
         self.ui.tools_table.setItem(self.tool_row, 1, label_tot_drill_count)
         self.ui.tools_table.setItem(self.tool_row, 1, label_tot_drill_count)
         self.ui.tools_table.setItem(self.tool_row, 2, tot_drill_count)  # Total number of drills
         self.ui.tools_table.setItem(self.tool_row, 2, tot_drill_count)  # Total number of drills
-        self.ui.tools_table.setItem(self.tool_row, 3, empty_1)  # Total number of drills
+        self.ui.tools_table.setItem(self.tool_row, 3, empty_1_1)
+        self.ui.tools_table.setItem(self.tool_row, 4, empty_1_2)
+        self.ui.tools_table.setItem(self.tool_row, 5, empty_1_3)
 
 
         font = QtGui.QFont()
         font = QtGui.QFont()
         font.setBold(True)
         font.setBold(True)
@@ -1989,8 +1996,12 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
         # add a last row with the Total number of slots
         # add a last row with the Total number of slots
         empty_2 = QtWidgets.QTableWidgetItem('')
         empty_2 = QtWidgets.QTableWidgetItem('')
         empty_2.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
         empty_2.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
-        empty_3 = QtWidgets.QTableWidgetItem('')
-        empty_3.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
+        empty_2_1 = QtWidgets.QTableWidgetItem('')
+        empty_2_1.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
+        empty_2_2 = QtWidgets.QTableWidgetItem('')
+        empty_2_2.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
+        empty_2_3 = QtWidgets.QTableWidgetItem('')
+        empty_2_3.setFlags(~QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
 
 
         label_tot_slot_count = QtWidgets.QTableWidgetItem(_('Total Slots'))
         label_tot_slot_count = QtWidgets.QTableWidgetItem(_('Total Slots'))
         tot_slot_count = QtWidgets.QTableWidgetItem('%d' % self.tot_slot_cnt)
         tot_slot_count = QtWidgets.QTableWidgetItem('%d' % self.tot_slot_cnt)
@@ -1999,8 +2010,10 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
 
 
         self.ui.tools_table.setItem(self.tool_row, 0, empty_2)
         self.ui.tools_table.setItem(self.tool_row, 0, empty_2)
         self.ui.tools_table.setItem(self.tool_row, 1, label_tot_slot_count)
         self.ui.tools_table.setItem(self.tool_row, 1, label_tot_slot_count)
-        self.ui.tools_table.setItem(self.tool_row, 2, empty_3)
+        self.ui.tools_table.setItem(self.tool_row, 2, empty_2_1)
         self.ui.tools_table.setItem(self.tool_row, 3, tot_slot_count)  # Total number of slots
         self.ui.tools_table.setItem(self.tool_row, 3, tot_slot_count)  # Total number of slots
+        self.ui.tools_table.setItem(self.tool_row, 4, empty_2_2)
+        self.ui.tools_table.setItem(self.tool_row, 5, empty_2_3)
 
 
         for kl in [1, 2, 3]:
         for kl in [1, 2, 3]:
             self.ui.tools_table.item(self.tool_row, kl).setFont(font)
             self.ui.tools_table.item(self.tool_row, kl).setFont(font)

+ 1 - 0
README.md

@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
 
 
 - fixed issue in NCC Tool when using area option
 - fixed issue in NCC Tool when using area option
 - added formatting for some strings in the app strings, making the future translations easier
 - added formatting for some strings in the app strings, making the future translations easier
+- made changes in the Excellon Tools Table to make it more clear that the tools are selected in the # column and not in the Plot column
 
 
 1.09.2019
 1.09.2019
 
 

+ 4 - 2
flatcamGUI/ObjectUI.py

@@ -558,7 +558,8 @@ class ExcellonObjectUI(ObjectUI):
         self.tools_table.horizontalHeaderItem(0).setToolTip(
         self.tools_table.horizontalHeaderItem(0).setToolTip(
             _("This is the Tool Number.\n"
             _("This is the Tool Number.\n"
               "When ToolChange is checked, on toolchange event this value\n"
               "When ToolChange is checked, on toolchange event this value\n"
-              "will be showed as a T1, T2 ... Tn in the Machine Code."))
+              "will be showed as a T1, T2 ... Tn in the Machine Code.\n\n"
+              "Here the tools are selected for G-code generation."))
         self.tools_table.horizontalHeaderItem(1).setToolTip(
         self.tools_table.horizontalHeaderItem(1).setToolTip(
             _("Tool Diameter. It's value (in current FlatCAM units) \n"
             _("Tool Diameter. It's value (in current FlatCAM units) \n"
               "is the cut width into the material."))
               "is the cut width into the material."))
@@ -573,7 +574,8 @@ class ExcellonObjectUI(ObjectUI):
               "to create the desired exit hole diameter due of the tip shape.\n"
               "to create the desired exit hole diameter due of the tip shape.\n"
               "The value here can compensate the Cut Z parameter."))
               "The value here can compensate the Cut Z parameter."))
         self.tools_table.horizontalHeaderItem(5).setToolTip(
         self.tools_table.horizontalHeaderItem(5).setToolTip(
-            _("Toggle display of the drills for the current tool."))
+            _("Toggle display of the drills for the current tool.\n"
+              "This does not select the tools for G-code generation."))
 
 
         self.empty_label = QtWidgets.QLabel('')
         self.empty_label = QtWidgets.QLabel('')
         self.tools_box.addWidget(self.empty_label)
         self.tools_box.addWidget(self.empty_label)