diff --git a/README.md b/README.md index 6a9c7726..4be267f1 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ CAD program, and create G-Code for Isolation routing. - when multiple tools are selected in Excellon UI and parameters are modified it will applied to all selected - in Excellon UI, Paint Tool and NCC Tool finished the "Apply parameters to all tools" functionality - updated Paint Tool and NCC Tool in the UI functionality +- fixed the Offset spinbox not being controller by offset checkbox in NCC Tool 16.02.2020 diff --git a/flatcamTools/ToolNonCopperClear.py b/flatcamTools/ToolNonCopperClear.py index 89889a5d..d07b9b63 100644 --- a/flatcamTools/ToolNonCopperClear.py +++ b/flatcamTools/ToolNonCopperClear.py @@ -1108,35 +1108,6 @@ class NonCopperClear(FlatCAMTool, Gerber): self.tool_type_radio.activated_custom.connect(self.on_tool_type) - # first disconnect - for opt in self.form_fields: - current_widget = self.form_fields[opt] - if isinstance(current_widget, FCCheckBox): - try: - current_widget.stateChanged.disconnect() - except (TypeError, ValueError): - pass - if isinstance(current_widget, RadioSet): - try: - current_widget.activated_custom.disconnect() - except (TypeError, ValueError): - pass - elif isinstance(current_widget, FCDoubleSpinner): - try: - current_widget.returnPressed.disconnect() - except (TypeError, ValueError): - pass - - try: - self.ncc_rest_cb.stateChanged.disconnect() - except (TypeError, ValueError): - pass - try: - self.ncc_order_radio.activated_custom[str].disconnect() - except (TypeError, ValueError): - pass - - # then reconnect for opt in self.form_fields: current_widget = self.form_fields[opt] if isinstance(current_widget, FCCheckBox): @@ -1145,6 +1116,8 @@ class NonCopperClear(FlatCAMTool, Gerber): current_widget.activated_custom.connect(self.form_to_storage) elif isinstance(current_widget, FCDoubleSpinner): current_widget.returnPressed.connect(self.form_to_storage) + elif isinstance(current_widget, FCComboBox): + current_widget.currentIndexChanged.connect(self.form_to_storage) self.ncc_rest_cb.stateChanged.connect(self.on_rest_machining_check) self.ncc_order_radio.activated_custom[str].connect(self.on_order_changed) @@ -1174,17 +1147,22 @@ class NonCopperClear(FlatCAMTool, Gerber): current_widget = self.form_fields[opt] if isinstance(current_widget, FCCheckBox): try: - current_widget.stateChanged.disconnect() + current_widget.stateChanged.disconnect(self.form_to_storage) except (TypeError, ValueError): pass if isinstance(current_widget, RadioSet): try: - current_widget.activated_custom.disconnect() + current_widget.activated_custom.disconnect(self.form_to_storage) except (TypeError, ValueError): pass elif isinstance(current_widget, FCDoubleSpinner): try: - current_widget.returnPressed.disconnect() + current_widget.returnPressed.disconnect(self.form_to_storage) + except (TypeError, ValueError): + pass + elif isinstance(current_widget, FCComboBox): + try: + current_widget.currentIndexChanged.disconnect(self.form_to_storage) except (TypeError, ValueError): pass