commit
219b817f41
|
@ -3959,7 +3959,7 @@ class App(QtCore.QObject):
|
|||
def on_toggle_units_click(self):
|
||||
try:
|
||||
self.ui.general_defaults_form.general_app_group.units_radio.activated_custom.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
if self.defaults["units"] == 'MM':
|
||||
|
@ -5180,7 +5180,7 @@ class App(QtCore.QObject):
|
|||
# this disconnect() is done so the slot will be connected only once
|
||||
try:
|
||||
self.ui.plot_tab_area.tab_closed_signal.disconnect(self.on_preferences_closed)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
self.ui.plot_tab_area.tab_closed_signal.connect(self.on_preferences_closed)
|
||||
|
||||
|
@ -5189,8 +5189,8 @@ class App(QtCore.QObject):
|
|||
for tb in self.ui.pref_tab_area.widget(idx).findChildren(QtCore.QObject):
|
||||
try:
|
||||
try:
|
||||
tb.textEdited.disconnect()
|
||||
except TypeError:
|
||||
tb.textEdited.disconnect(self.on_preferences_edited)
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
tb.textEdited.connect(self.on_preferences_edited)
|
||||
except AttributeError:
|
||||
|
@ -5198,8 +5198,8 @@ class App(QtCore.QObject):
|
|||
|
||||
try:
|
||||
try:
|
||||
tb.modificationChanged.disconnect()
|
||||
except TypeError:
|
||||
tb.modificationChanged.disconnect(self.on_preferences_edited)
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
tb.modificationChanged.connect(self.on_preferences_edited)
|
||||
except AttributeError:
|
||||
|
@ -5207,8 +5207,8 @@ class App(QtCore.QObject):
|
|||
|
||||
try:
|
||||
try:
|
||||
tb.toggled.disconnect()
|
||||
except TypeError:
|
||||
tb.toggled.disconnect(self.on_preferences_edited)
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
tb.toggled.connect(self.on_preferences_edited)
|
||||
except AttributeError:
|
||||
|
@ -5216,8 +5216,8 @@ class App(QtCore.QObject):
|
|||
|
||||
try:
|
||||
try:
|
||||
tb.valueChanged.disconnect()
|
||||
except TypeError:
|
||||
tb.valueChanged.disconnect(self.on_preferences_edited)
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
tb.valueChanged.connect(self.on_preferences_edited)
|
||||
except AttributeError:
|
||||
|
@ -5225,8 +5225,8 @@ class App(QtCore.QObject):
|
|||
|
||||
try:
|
||||
try:
|
||||
tb.currentIndexChanged.disconnect()
|
||||
except TypeError:
|
||||
tb.currentIndexChanged.disconnect(self.on_preferences_edited)
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
tb.currentIndexChanged.connect(self.on_preferences_edited)
|
||||
except AttributeError:
|
||||
|
@ -5241,27 +5241,27 @@ class App(QtCore.QObject):
|
|||
for idx in range(self.ui.pref_tab_area.count()):
|
||||
for tb in self.ui.pref_tab_area.widget(idx).findChildren(QtCore.QObject):
|
||||
try:
|
||||
tb.textEdited.disconnect()
|
||||
tb.textEdited.disconnect(self.on_preferences_edited)
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
tb.modificationChanged.disconnect()
|
||||
tb.modificationChanged.disconnect(self.on_preferences_edited)
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
tb.toggled.disconnect()
|
||||
tb.toggled.disconnect(self.on_preferences_edited)
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
tb.valueChanged.disconnect()
|
||||
tb.valueChanged.disconnect(self.on_preferences_edited)
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
tb.currentIndexChanged.disconnect()
|
||||
tb.currentIndexChanged.disconnect(self.on_preferences_edited)
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
|
|
|
@ -582,7 +582,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
|
|||
try:
|
||||
# if connected, disconnect the signal from the slot on item_changed as it creates issues
|
||||
self.ui.apertures_table.itemChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
self.apertures_row = 0
|
||||
|
@ -726,12 +726,12 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
|
|||
for row in range(self.ui.apertures_table.rowCount()):
|
||||
try:
|
||||
self.ui.apertures_table.cellWidget(row, 5).clicked.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.ui.mark_all_cb.clicked.disconnect(self.on_mark_all_click)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
def on_generatenoncopper_button_click(self, *args):
|
||||
|
@ -1832,7 +1832,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
|
|||
try:
|
||||
# if connected, disconnect the signal from the slot on item_changed as it creates issues
|
||||
self.ui.tools_table.itemChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
n = len(self.tools)
|
||||
|
@ -2120,12 +2120,12 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
|
|||
for row in range(self.ui.tools_table.rowCount()):
|
||||
try:
|
||||
self.ui.tools_table.cellWidget(row, 5).clicked.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.ui.plot_cb.stateChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
def on_tool_offset_edit(self):
|
||||
|
@ -3501,66 +3501,66 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||
if isinstance(current_widget, FCCheckBox):
|
||||
try:
|
||||
self.ui.grid3.itemAt(i).widget().stateChanged.disconnect(self.gui_form_to_storage)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
elif isinstance(current_widget, FCComboBox):
|
||||
try:
|
||||
self.ui.grid3.itemAt(i).widget().currentIndexChanged.disconnect(self.gui_form_to_storage)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
elif isinstance(current_widget, LengthEntry) or isinstance(current_widget, IntEntry) or \
|
||||
isinstance(current_widget, FCEntry) or isinstance(current_widget, FloatEntry):
|
||||
try:
|
||||
self.ui.grid3.itemAt(i).widget().editingFinished.disconnect(self.gui_form_to_storage)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
for row in range(self.ui.geo_tools_table.rowCount()):
|
||||
for col in [2, 3, 4]:
|
||||
try:
|
||||
self.ui.geo_tools_table.cellWidget(row, col).currentIndexChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.ui.addtool_btn.clicked.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.ui.copytool_btn.clicked.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.ui.deltool_btn.clicked.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.ui.geo_tools_table.currentItemChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.ui.geo_tools_table.itemChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.ui.tool_offset_entry.editingFinished.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
for row in range(self.ui.geo_tools_table.rowCount()):
|
||||
try:
|
||||
self.ui.geo_tools_table.cellWidget(row, 6).clicked.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.ui.plot_cb.stateChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
def on_tool_add(self, dia=None):
|
||||
|
@ -5546,7 +5546,7 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
|
|||
|
||||
try:
|
||||
self.ui.annotation_cb.stateChanged.disconnect(self.on_annotation_change)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
self.ui.annotation_cb.stateChanged.connect(self.on_annotation_change)
|
||||
|
||||
|
@ -5590,7 +5590,7 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
|
|||
self.ui.cnc_tools_table.cellWidget(row, 6).clicked.disconnect(self.on_plot_cb_click_table)
|
||||
try:
|
||||
self.ui.plot_cb.stateChanged.disconnect(self.on_plot_cb_click)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
def on_updateplot_button_click(self, *args):
|
||||
|
|
|
@ -18,6 +18,9 @@ CAD program, and create G-Code for Isolation routing.
|
|||
- added a detection if any values are changed in the Edit -> Preferences window and on close it will ask the user if he wants to save the changes or not
|
||||
- created a new menu entry in the File menu named Recent projects that will hold the recent projects and the previous "Recent files" will hold only the previous loaded files
|
||||
- updated all translations for the new strings
|
||||
- fixed bug recently introduced that when changing the units in the Edit -> Preferences it did not converted the values
|
||||
- fixed another bug that when selecting an Excellon object after disabling it it crashed the app
|
||||
- RELEASE 8.92
|
||||
|
||||
30.07.2019
|
||||
|
||||
|
|
|
@ -669,7 +669,7 @@ class FCDrillSelect(DrawTool):
|
|||
# select the diameter of the selected shape in the tool table
|
||||
try:
|
||||
self.draw_app.tools_table_exc.cellPressed.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
sel_tools = set()
|
||||
|
@ -1258,12 +1258,12 @@ class FlatCAMExcEditor(QtCore.QObject):
|
|||
try:
|
||||
# if connected, disconnect the signal from the slot on item_changed as it creates issues
|
||||
self.tools_table_exc.itemChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.tools_table_exc.cellPressed.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
# updated units
|
||||
|
@ -1820,17 +1820,17 @@ class FlatCAMExcEditor(QtCore.QObject):
|
|||
|
||||
try:
|
||||
self.app.ui.popmenu_copy.triggered.disconnect(self.exc_copy_drills)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.popmenu_delete.triggered.disconnect(self.on_delete_btn)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.popmenu_move.triggered.disconnect(self.exc_move_drills)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
self.app.ui.popmenu_copy.triggered.connect(self.app.on_copy_object)
|
||||
|
@ -1840,12 +1840,12 @@ class FlatCAMExcEditor(QtCore.QObject):
|
|||
# Excellon Editor
|
||||
try:
|
||||
self.app.ui.drill.triggered.disconnect(self.exc_add_drill)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.drill_array.triggered.disconnect(self.exc_add_drill_array)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
def clear(self):
|
||||
|
|
|
@ -3296,15 +3296,15 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
|||
|
||||
try:
|
||||
self.app.ui.popmenu_copy.triggered.disconnect(lambda: self.select_tool('copy'))
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
try:
|
||||
self.app.ui.popmenu_delete.triggered.disconnect(self.on_delete_btn)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
try:
|
||||
self.app.ui.popmenu_move.triggered.disconnect(lambda: self.select_tool('move'))
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
self.app.ui.popmenu_copy.triggered.connect(self.app.on_copy_object)
|
||||
|
@ -3314,22 +3314,22 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
|||
# Geometry Editor
|
||||
try:
|
||||
self.app.ui.draw_line.triggered.disconnect(self.draw_tool_path)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.draw_rect.triggered.disconnect(self.draw_tool_rectangle)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.draw_cut.triggered.disconnect(self.cutpath)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.draw_move.triggered.disconnect(self.on_move)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
def add_shape(self, shape):
|
||||
|
|
|
@ -1693,7 +1693,7 @@ class FCScale(FCShapeTool):
|
|||
|
||||
try:
|
||||
self.draw_app.scale_button.clicked.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
self.draw_app.scale_button.clicked.connect(self.on_scale_click)
|
||||
|
||||
|
@ -1735,7 +1735,7 @@ class FCBuffer(FCShapeTool):
|
|||
|
||||
try:
|
||||
self.draw_app.buffer_button.clicked.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
self.draw_app.buffer_button.clicked.connect(self.on_buffer_click)
|
||||
|
||||
|
@ -1777,7 +1777,7 @@ class FCMarkArea(FCShapeTool):
|
|||
|
||||
try:
|
||||
self.draw_app.ma_threshold__button.clicked.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
self.draw_app.ma_threshold__button.clicked.connect(self.on_markarea_click)
|
||||
|
||||
|
@ -2934,12 +2934,12 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||
try:
|
||||
# if connected, disconnect the signal from the slot on item_changed as it creates issues
|
||||
self.apertures_table.itemChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.apertures_table.cellPressed.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
# updated units
|
||||
|
@ -3488,17 +3488,17 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||
|
||||
try:
|
||||
self.app.ui.popmenu_copy.triggered.disconnect(self.on_copy_button)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.popmenu_delete.triggered.disconnect(self.on_delete_btn)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.popmenu_move.triggered.disconnect(self.on_move_button)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
self.app.ui.popmenu_copy.triggered.connect(self.app.on_copy_object)
|
||||
|
@ -3509,22 +3509,22 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||
|
||||
try:
|
||||
self.app.ui.grb_draw_pad.triggered.disconnect(self.on_pad_add)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.grb_draw_pad_array.triggered.disconnect(self.on_pad_add_array)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.grb_draw_track.triggered.disconnect(self.on_track_add)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.app.ui.grb_draw_region.triggered.disconnect(self.on_region_add)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
def clear(self):
|
||||
|
|
|
@ -461,7 +461,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||
try:
|
||||
# if connected, disconnect the signal from the slot on item_changed as it creates issues
|
||||
self.tools_table.itemChanged.disconnect(self.on_tool_edit)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
def on_tool_add(self, dia=None, muted=None):
|
||||
|
|
|
@ -366,7 +366,7 @@ class ToolPDF(FlatCAMTool):
|
|||
self.check_thread.setInterval(check_period)
|
||||
try:
|
||||
self.check_thread.timeout.disconnect(self.periodic_check_handler)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
self.check_thread.timeout.connect(self.periodic_check_handler)
|
||||
|
|
|
@ -437,7 +437,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||
try:
|
||||
# if connected, disconnect the signal from the slot on item_changed as it creates issues
|
||||
self.tools_table.itemChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
# updated units
|
||||
|
|
|
@ -646,22 +646,22 @@ class SolderPaste(FlatCAMTool):
|
|||
if isinstance(self.gcode_form_layout.itemAt(i).widget(), FCComboBox):
|
||||
try:
|
||||
self.gcode_form_layout.itemAt(i).widget().currentIndexChanged.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
if isinstance(self.gcode_form_layout.itemAt(i).widget(), FCEntry):
|
||||
try:
|
||||
self.gcode_form_layout.itemAt(i).widget().editingFinished.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.tools_table.itemChanged.disconnect(self.on_tool_edit)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
try:
|
||||
self.tools_table.currentItemChanged.disconnect(self.on_row_selection_change)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
def update_comboboxes(self, obj, status):
|
||||
|
|
|
@ -175,13 +175,13 @@ class ToolSub(FlatCAMTool):
|
|||
|
||||
try:
|
||||
self.intersect_btn.clicked.disconnect(self.on_grb_intersection_click)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
self.intersect_btn.clicked.connect(self.on_grb_intersection_click)
|
||||
|
||||
try:
|
||||
self.intersect_geo_btn.clicked.disconnect()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
self.intersect_geo_btn.clicked.connect(self.on_geo_intersection_click)
|
||||
|
||||
|
@ -569,14 +569,14 @@ class ToolSub(FlatCAMTool):
|
|||
|
||||
try:
|
||||
self.check_thread.stop()
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
if reset:
|
||||
self.check_thread.setInterval(check_period)
|
||||
try:
|
||||
self.check_thread.timeout.disconnect(self.periodic_check_handler)
|
||||
except TypeError:
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
|
||||
self.check_thread.timeout.connect(self.periodic_check_handler)
|
||||
|
|
Loading…
Reference in New Issue