diff --git a/CHANGELOG.md b/CHANGELOG.md index f147fa71..da5ccc9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ CHANGELOG for FlatCAM beta - various string changes; updated the strings - brought up-to-date the Romanian translation strings - updated the source file when creating Excellon objects in various places in the app +- working in Milling Tool 14.11.2020 diff --git a/appTools/ToolMilling.py b/appTools/ToolMilling.py index 00a74f4d..1048d637 100644 --- a/appTools/ToolMilling.py +++ b/appTools/ToolMilling.py @@ -331,7 +331,7 @@ class ToolMilling(AppTool, Excellon): # init the working variables self.default_data.clear() self.default_data = { - "name": outname + '_iso', + "name": outname + '_mill', "plot": self.app.defaults["excellon_plot"], "solid": False, "multicolored": False, @@ -392,6 +392,7 @@ class ToolMilling(AppTool, Excellon): # ######################################## self.ui.target_radio.set_value("geo") + self.ui.addtool_entry.set_value(self.app.defaults["geometry_cnctooldia"]) self.on_object_changed() if self.target_obj: @@ -1438,6 +1439,10 @@ class ToolMilling(AppTool, Excellon): def on_tool_add(self, clicked_state, dia=None, new_geo=None): log.debug("GeometryObject.on_add_tool()") + if self.target_obj is None: + self.app.inform.emit('[ERROR_NOTCL] %s' % _("No object is selected.")) + return + self.ui_disconnect() filename = self.app.tools_database_path() diff --git a/app_Main.py b/app_Main.py index 77967050..11d23efa 100644 --- a/app_Main.py +++ b/app_Main.py @@ -5965,6 +5965,11 @@ class App(QtCore.QObject): """ tool_from_db = deepcopy(tool) obj = self.collection.get_active() + + if obj is None: + self.inform.emit('[ERROR_NOTCL] %s' % _("No object is selected.")) + return + if obj.kind == 'geometry': if tool['data']['tool_target'] not in [0, 1]: # General, Milling Type # close the tab and delete it