diff --git a/CHANGELOG.md b/CHANGELOG.md index 344b066d..79b463b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ CHANGELOG for FlatCAM beta ================================================= +6.11.2021 + +- in Isolation Plugin there is no longer auto-switch to Properties Tab +- when editing Geometry objects with multiple geometry fixed the issue with the edited geometry always being the one in the first tool + 1.11.2021 - Cutout Plugin - improved the functionality in Manual mode: depending on the state of the Shape parameter different types of cutout manual geometry is generated diff --git a/appObjects/FlatCAMGeometry.py b/appObjects/FlatCAMGeometry.py index e2e893ed..6e0663ca 100644 --- a/appObjects/FlatCAMGeometry.py +++ b/appObjects/FlatCAMGeometry.py @@ -348,7 +348,7 @@ class GeometryObject(FlatCAMObj, Geometry): # following convoluted way of changing the keys from string to float type temp_tools = {} for tooluid_key in self.tools: - val = deepcopy(self.tools[tooluid_key]) + val = deepcopy(self.tools[int(tooluid_key)]) new_key = deepcopy(int(tooluid_key)) temp_tools[new_key] = val @@ -394,10 +394,15 @@ class GeometryObject(FlatCAMObj, Geometry): self.set_offset_values() + self.ui.geo_tools_table.itemSelectionChanged.connect(self.on_row_changed) + # Show/Hide Advanced Options app_mode = self.app.defaults["global_app_level"] self.change_level(app_mode) + def on_row_changed(self): + pass + def set_offset_values(self): xmin, ymin, xmax, ymax = self.bounds() center_coords = ( diff --git a/appPlugins/ToolCutOut.py b/appPlugins/ToolCutOut.py index 5a6bd1b7..910749c4 100644 --- a/appPlugins/ToolCutOut.py +++ b/appPlugins/ToolCutOut.py @@ -958,9 +958,7 @@ class CutOut(AppTool): geo_obj.tools[1]['data']['tools_mill_multidepth'] = self.ui.mpass_cb.get_value() geo_obj.tools[1]['data']['tools_mill_depthperpass'] = self.ui.maxdepth_entry.get_value() - if not gaps_solid_geo: - pass - else: + if gaps_solid_geo: geo_obj.tools[99] = deepcopy(self.cut_tool_dict) geo_obj.tools[99]['tooldia'] = str(cut_dia) geo_obj.tools[99]['solid_geometry'] = gaps_solid_geo diff --git a/appPlugins/ToolIsolation.py b/appPlugins/ToolIsolation.py index 181a06d5..d04654c7 100644 --- a/appPlugins/ToolIsolation.py +++ b/appPlugins/ToolIsolation.py @@ -1929,7 +1929,7 @@ class ToolIsolation(AppTool, Gerber): self.temp_shapes.clear(update=True) # Switch notebook to Properties page - self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab) + # self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab) def combined_rest(self, iso_obj, iso2geo, tools_storage, lim_area, negative_dia=None, plot=True): """ diff --git a/app_Main.py b/app_Main.py index a9f5177f..cb502ec4 100644 --- a/app_Main.py +++ b/app_Main.py @@ -2547,16 +2547,16 @@ class App(QtCore.QObject): self.inform.emit('[ERROR_NOTCL] %s %s' % (_("The Editor could not start."), _("No object is selected."))) return - edited_object.build_ui() - self.ui.notebook.setCurrentWidget(self.ui.properties_tab) - if edited_object and edited_object.kind in ['cncjob', 'excellon', 'geometry', 'gerber']: - pass + if edited_object.kind != 'geometry': + edited_object.build_ui() else: self.inform.emit('[WARNING_NOTCL] %s' % _("Select a Geometry, Gerber, Excellon or CNCJob Object to edit.")) self.ui.menuobjects.setDisabled(False) return + self.ui.notebook.setCurrentWidget(self.ui.properties_tab) + if edited_object.kind == 'geometry': if self.geo_editor is None: self.ui.menuobjects.setDisabled(False) @@ -2568,7 +2568,6 @@ class App(QtCore.QObject): # we set the notebook to hidden # self.ui.splitter.setSizes([0, 1]) - if edited_object.multigeo is True: sel_rows = set() for item in edited_object.ui.geo_tools_table.selectedItems(): @@ -2589,14 +2588,10 @@ class App(QtCore.QObject): return # determine the tool dia of the selected tool - selected_tooldia = float(edited_object.ui.geo_tools_table.item(sel_rows[0], 1).text()) + # selected_tooldia = float(edited_object.ui.geo_tools_table.item(sel_rows[0], 1).text()) + sel_id = int(edited_object.ui.geo_tools_table.item(sel_rows[0], 5).text()) - # now find the key in the edited_object.tools that has this tooldia - multi_tool = 1 - for tool in edited_object.tools: - if edited_object.tools[tool]['tooldia'] == selected_tooldia: - multi_tool = tool - break + multi_tool = sel_id self.log.debug("Editing MultiGeo Geometry with tool diameter: %s" % str(multi_tool)) self.geo_editor.edit_fcgeometry(edited_object, multigeo_tool=multi_tool) else: