diff --git a/CHANGELOG.md b/CHANGELOG.md index 7eb6d84b..968cffb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ CHANGELOG for FlatCAM beta - Tool Drilling - working on the UI - Tool Drilling - added more tool parameters; laying the ground for adding "Drilling Slots" feature +- added as ToolTip for the the Preprocessor combobox items, the actual name of the items 7.07.2020 diff --git a/appObjects/FlatCAMGeometry.py b/appObjects/FlatCAMGeometry.py index 11cee268..2d5b089a 100644 --- a/appObjects/FlatCAMGeometry.py +++ b/appObjects/FlatCAMGeometry.py @@ -399,9 +399,15 @@ class GeometryObject(FlatCAMObj, Geometry): self.units = self.app.defaults['units'].upper() self.units_found = self.app.defaults['units'] + # make sure the preprocessor combobox is clear + self.ui.pp_geometry_name_cb.clear() # populate preprocessor names in the combobox for name in list(self.app.preprocessors.keys()): self.ui.pp_geometry_name_cb.addItem(name) + # add tooltips + for it in range(self.ui.pp_geometry_name_cb.count()): + self.ui.pp_geometry_name_cb.setItemData( + it, self.ui.pp_geometry_name_cb.itemText(it), QtCore.Qt.ToolTipRole) self.form_fields.update({ "plot": self.ui.plot_cb, diff --git a/appTools/ToolDrilling.py b/appTools/ToolDrilling.py index 93e728f8..380329e0 100644 --- a/appTools/ToolDrilling.py +++ b/appTools/ToolDrilling.py @@ -242,12 +242,18 @@ class ToolDrilling(AppTool, Excellon): except Exception: pass + # reset the Excellon preprocessor combo + self.t_ui.pp_excellon_name_cb.clear() # populate Excellon preprocessor combobox list for name in list(self.app.preprocessors.keys()): # the HPGL preprocessor is only for Geometry not for Excellon job therefore don't add it if name == 'hpgl': continue self.t_ui.pp_excellon_name_cb.addItem(name) + # add tooltips + for it in range(self.t_ui.pp_excellon_name_cb.count()): + self.t_ui.pp_excellon_name_cb.setItemData( + it, self.t_ui.pp_excellon_name_cb.itemText(it), QtCore.Qt.ToolTipRole) # update the changes in UI depending on the selected preprocessor in Preferences # after this moment all the changes in the Posprocessor combo will be handled by the activated signal of the diff --git a/app_Main.py b/app_Main.py index d4485745..66922dbe 100644 --- a/app_Main.py +++ b/app_Main.py @@ -561,6 +561,7 @@ class App(QtCore.QObject): # and now put back the ordered dict with 'default' key first self.preprocessors = new_ppp_dict + # populate the Preprocessor ComboBoxes in the PREFERENCES for name in list(self.preprocessors.keys()): # 'Paste' preprocessors are to be used only in the Solder Paste Dispensing Tool if name.partition('_')[0] == 'Paste': @@ -574,6 +575,19 @@ class App(QtCore.QObject): self.ui.excellon_defaults_form.excellon_opt_group.pp_excellon_name_cb.addItem(name) + # add ToolTips for the Preprocessor ComboBoxes in Preferences + for it in range(self.ui.tools_defaults_form.tools_solderpaste_group.pp_combo.count()): + self.ui.tools_defaults_form.tools_solderpaste_group.pp_combo.setItemData( + it, self.ui.tools_defaults_form.tools_solderpaste_group.pp_combo.itemText(it), QtCore.Qt.ToolTipRole) + for it in range(self.ui.geometry_defaults_form.geometry_opt_group.pp_geometry_name_cb.count()): + self.ui.geometry_defaults_form.geometry_opt_group.pp_geometry_name_cb.setItemData( + it, self.ui.geometry_defaults_form.geometry_opt_group.pp_geometry_name_cb.itemText(it), + QtCore.Qt.ToolTipRole) + for it in range(self.ui.excellon_defaults_form.excellon_opt_group.pp_excellon_name_cb.count()): + self.ui.excellon_defaults_form.excellon_opt_group.pp_excellon_name_cb.setItemData( + it, self.ui.excellon_defaults_form.excellon_opt_group.pp_excellon_name_cb.itemText(it), + QtCore.Qt.ToolTipRole) + # ########################################################################################################### # ##################################### UPDATE PREFERENCES GUI FORMS ######################################## # ###########################################################################################################