From 5032d8e8fec0a9856fdba600a9e552f038261732 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sun, 29 Dec 2019 00:40:27 +0200 Subject: [PATCH] - the Apply button text in Preferences is now made red when changes were made and require to be applied --- FlatCAMApp.py | 15 ++++++++++----- README.md | 4 ++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 9e5fdd22..8941d117 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -6828,6 +6828,8 @@ class App(QtCore.QObject): if self.ui.plot_tab_area.tabText(idx) == _("Preferences"): self.ui.plot_tab_area.tabBar.setTabTextColor(idx, QtGui.QColor('black')) + self.ui.pref_apply_button.setStyleSheet("QPushButton {color: black;}") + self.inform.emit('%s' % _("Preferences applied.")) # make sure we update the self.current_defaults dict used to undo changes to self.defaults @@ -7616,13 +7618,16 @@ class App(QtCore.QObject): pass def on_preferences_edited(self): - self.inform.emit('[WARNING_NOTCL] %s' % _("Preferences edited but not saved.")) + if self.preferences_changed_flag is False: + 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')) + 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 + self.ui.pref_apply_button.setStyleSheet("QPushButton {color: red;}") + + self.preferences_changed_flag = True def on_tools_database(self): """ diff --git a/README.md b/README.md index 4bec127a..000edb78 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing. ================================================= +29.12.2019 + +- the Apply button text in Preferences is now made red when changes were made and require to be applied + 28.12.2019 - more updates to the Preferences window and in some other parts of the GUI