diff --git a/FlatCAMApp.py b/FlatCAMApp.py index d1dcd2f0..a43f9da6 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -6709,8 +6709,15 @@ class App(QtCore.QObject): def on_save_button(self): log.debug("App.on_save_button() --> Saving preferences to file.") + + # Preferences saved, update flag self.preferences_changed_flag = False + # Preferences save, update the color of the Preferences Tab text + for idx in range(self.ui.plot_tab_area.count()): + if self.ui.plot_tab_area.tabText(idx) == _("Preferences"): + self.ui.plot_tab_area.tabBar.setTabTextColor(idx, QtGui.QColor('black')) + self.save_defaults(silent=False) # load the defaults so they are updated into the app self.load_defaults(filename='current_defaults') @@ -7414,6 +7421,11 @@ class App(QtCore.QObject): def on_preferences_edited(self): self.inform.emit('[WARNING_NOTCL] %s' % _("Preferences edited but not saved.")) + + for idx in range(self.ui.plot_tab_area.count()): + if self.ui.plot_tab_area.tabText(idx) == _("Preferences"): + self.ui.plot_tab_area.tabBar.setTabTextColor(idx, QtGui.QColor('red')) + self.preferences_changed_flag = True def on_plot_area_tab_closed(self, title): diff --git a/README.md b/README.md index 8a1a12d1..7dcd06e9 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ CAD program, and create G-Code for Isolation routing. - the "CRTL+S" key combo when the Preferences Tab is in focus will save the Preferences instead of saving the Project - fixed bug in the Paint Tool that did not allow choosing a Paint Method that was not Standard - made sure that in the FlatCAMGeometry.merge() all the source data is deepcopy-ed in the final object +- the font color of the Preferences tab will change to red if settings are not saved and it will revert to default when saved +- fixed issue #333. The Geometry Editor Paint tool was not working and using it resulted in an error 5.11.2019 diff --git a/flatcamEditors/FlatCAMGeoEditor.py b/flatcamEditors/FlatCAMGeoEditor.py index 7017929e..087f3a19 100644 --- a/flatcamEditors/FlatCAMGeoEditor.py +++ b/flatcamEditors/FlatCAMGeoEditor.py @@ -4664,17 +4664,16 @@ class FlatCAMGeoEditor(QtCore.QObject): poly_buf = Polygon(geo_obj).buffer(-margin) if method == "seed": - cp = Geometry.clear_polygon2(poly_buf, - tooldia, self.app.defaults["geometry_circle_steps"], + cp = Geometry.clear_polygon2(self, polygon_to_clear=poly_buf, tooldia=tooldia, + steps_per_circle=self.app.defaults["geometry_circle_steps"], overlap=overlap, contour=contour, connect=connect) elif method == "lines": - cp = Geometry.clear_polygon3(poly_buf, - tooldia, self.app.defaults["geometry_circle_steps"], + cp = Geometry.clear_polygon3(self, polygon=poly_buf, tooldia=tooldia, + steps_per_circle=self.app.defaults["geometry_circle_steps"], overlap=overlap, contour=contour, connect=connect) - else: - cp = Geometry.clear_polygon(poly_buf, - tooldia, self.app.defaults["geometry_circle_steps"], + cp = Geometry.clear_polygon(self, polygon=poly_buf, tooldia=tooldia, + steps_per_circle=self.app.defaults["geometry_circle_steps"], overlap=overlap, contour=contour, connect=connect) if cp is not None: