- the Apply button text in Preferences is now made red when changes were made and require to be applied

This commit is contained in:
Marius Stanciu 2019-12-29 00:40:27 +02:00 committed by Marius
parent 58054f71b3
commit 5032d8e8fe
2 changed files with 14 additions and 5 deletions

View File

@ -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):
"""

View File

@ -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