- some refactoring
- working on Milling Tool and Drilling Tool: made sure that the plugin UI is initialized only when the plugin (Tool) is run in order to avoid errors like (wrapped C++ objects was deleted)
This commit is contained in:
@@ -956,12 +956,12 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
||||
|
||||
# ## Add properties to the object
|
||||
|
||||
# get the tool_table items in a list of row items
|
||||
tool_table_items = self.get_selected_tools_table_items()
|
||||
# get the plugin_table items in a list of row items
|
||||
plugin_table_items = self.get_selected_tools_table_items()
|
||||
# insert an information only element in the front
|
||||
tool_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
|
||||
plugin_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
|
||||
|
||||
geo_obj.options['Tools_in_use'] = tool_table_items
|
||||
geo_obj.options['Tools_in_use'] = plugin_table_items
|
||||
geo_obj.options['type'] = 'Excellon Geometry'
|
||||
geo_obj.options["tools_mill_tooldia"] = str(tooldia)
|
||||
geo_obj.options["multidepth"] = app_obj.defaults["geometry_multidepth"]
|
||||
@@ -1056,12 +1056,12 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
||||
|
||||
# ## Add properties to the object
|
||||
|
||||
# get the tool_table items in a list of row items
|
||||
tool_table_items = self.get_selected_tools_table_items()
|
||||
# get the plugin_table items in a list of row items
|
||||
plugin_table_items = self.get_selected_tools_table_items()
|
||||
# insert an information only element in the front
|
||||
tool_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
|
||||
plugin_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
|
||||
|
||||
geo_obj.options['Tools_in_use'] = tool_table_items
|
||||
geo_obj.options['Tools_in_use'] = plugin_table_items
|
||||
geo_obj.options['type'] = 'Excellon Geometry'
|
||||
geo_obj.options["tools_mill_tooldia"] = str(tooldia)
|
||||
geo_obj.options["multidepth"] = app_obj.defaults["geometry_multidepth"]
|
||||
@@ -1186,7 +1186,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
||||
check_row = 0
|
||||
|
||||
for tool_key in self.tools:
|
||||
# find the geo_tool_table row associated with the tool_key
|
||||
# find the geo_plugin_table row associated with the tool_key
|
||||
for row in range(self.ui.tools_table.rowCount()):
|
||||
tool_item = int(self.ui.tools_table.item(row, 0).text())
|
||||
if tool_item == int(tool_key):
|
||||
|
||||
@@ -1149,7 +1149,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
return
|
||||
|
||||
# #########################################################################################################
|
||||
# update the form with the V-Shape fields if V-Shape selected in the geo_tool_table
|
||||
# update the form with the V-Shape fields if V-Shape selected in the geo_plugin_table
|
||||
# also modify the Cut Z form entry to reflect the calculated Cut Z from values got from V-Shape Fields
|
||||
# #########################################################################################################
|
||||
try:
|
||||
@@ -3386,7 +3386,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
for tooluid_key in self.tools:
|
||||
solid_geometry = self.tools[tooluid_key]['solid_geometry']
|
||||
|
||||
# find the geo_tool_table row associated with the tooluid_key
|
||||
# find the geo_plugin_table row associated with the tooluid_key
|
||||
for row in range(self.ui.geo_tools_table.rowCount()):
|
||||
tooluid_item = int(self.ui.geo_tools_table.item(row, 5).text())
|
||||
if tooluid_item == int(tooluid_key):
|
||||
|
||||
Reference in New Issue
Block a user