Explorar el Código

- fixed some issues introduced in NCC Tool

Marius Stanciu hace 6 años
padre
commit
a92ecaf2de
Se han modificado 2 ficheros con 8 adiciones y 4 borrados
  1. 1 0
      README.md
  2. 7 4
      flatcamTools/ToolNonCopperClear.py

+ 1 - 0
README.md

@@ -18,6 +18,7 @@ CAD program, and create G-Code for Isolation routing.
 - added some more strings in Properties Tool for the translation
 - added some more strings in Properties Tool for the translation
 - in NCC Tool added area selection feature
 - in NCC Tool added area selection feature
 - fixed bug in Excellon parser for the Excellon files that do not put the type of zero suppression they use in the file (like DipTrace eCAD)
 - fixed bug in Excellon parser for the Excellon files that do not put the type of zero suppression they use in the file (like DipTrace eCAD)
+- fixed some issues introduced in NCC Tool
 
 
 20.08.2019
 20.08.2019
 
 

+ 7 - 4
flatcamTools/ToolNonCopperClear.py

@@ -815,7 +815,12 @@ class NonCopperClear(FlatCAMTool, Gerber):
         self.build_ui()
         self.build_ui()
 
 
     def on_ncc_click(self):
     def on_ncc_click(self):
-        if self.reference_radio.get_value() == 'itself':
+        self.bound_obj = None
+        self.ncc_obj = None
+
+        ref_choice = self.reference_radio.get_value()
+
+        if ref_choice == 'itself':
             self.bound_obj_name = self.object_combo.currentText()
             self.bound_obj_name = self.object_combo.currentText()
             # Get source object.
             # Get source object.
             try:
             try:
@@ -824,7 +829,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
                 self.app.inform.emit(_("[ERROR_NOTCL] Could not retrieve object: %s") % self.obj_name)
                 self.app.inform.emit(_("[ERROR_NOTCL] Could not retrieve object: %s") % self.obj_name)
                 return "Could not retrieve object: %s" % self.obj_name
                 return "Could not retrieve object: %s" % self.obj_name
             self.on_ncc()
             self.on_ncc()
-        elif self.reference_radio.get_value() == 'box':
+        elif ref_choice == 'box':
             self.bound_obj_name = self.box_combo.currentText()
             self.bound_obj_name = self.box_combo.currentText()
             # Get source object.
             # Get source object.
             try:
             try:
@@ -918,8 +923,6 @@ class NonCopperClear(FlatCAMTool, Gerber):
             self.app.plotcanvas.vis_connect('mouse_move', on_mouse_move)
             self.app.plotcanvas.vis_connect('mouse_move', on_mouse_move)
 
 
     def on_ncc(self):
     def on_ncc(self):
-        self.bound_obj = None
-        self.ncc_obj = None
 
 
         try:
         try:
             over = float(self.ncc_overlap_entry.get_value())
             over = float(self.ncc_overlap_entry.get_value())