- fixed the Punch Gerber Tool bug that did not allowed the projects to be loaded or to create a new project. Fixed issue #456

- in Tool Subtract added an option to delete the source objects after a successful operation. Fixed issue #455
This commit is contained in:
Marius Stanciu
2020-10-30 12:04:35 +02:00
committed by Marius
parent a7c03248d6
commit 46900d795d
4 changed files with 49 additions and 17 deletions

View File

@@ -42,6 +42,8 @@ class PreferencesUIManager:
# if Preferences are changed in the Edit -> Preferences tab the value will be set to True
self.preferences_changed_flag = False
self.old_color = QtGui.QColor('black')
# when adding entries here read the comments in the method found below named:
# def app_obj.new_object(self, kind, name, initialize, active=True, fit=True, plot=True)
self.defaults_form_fields = {
@@ -908,7 +910,7 @@ class PreferencesUIManager:
# 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.ui.plot_tab_area.tabBar.setTabTextColor(idx, self.old_color)
# restore the default stylesheet by setting a blank one
self.ui.pref_apply_button.setStyleSheet("")
@@ -1001,7 +1003,7 @@ class PreferencesUIManager:
# close the tab and delete it
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.ui.plot_tab_area.tabBar.setTabTextColor(idx, self.old_color)
self.ui.plot_tab_area.closeTab(idx)
break
@@ -1029,7 +1031,7 @@ class PreferencesUIManager:
# 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.ui.plot_tab_area.tabBar.setTabTextColor(idx, self.old_color)
self.ui.plot_tab_area.closeTab(idx)
break
@@ -1134,6 +1136,7 @@ class PreferencesUIManager:
for idx in range(self.ui.plot_tab_area.count()):
if self.ui.plot_tab_area.tabText(idx) == _("Preferences"):
self.old_color = self.ui.plot_tab_area.tabBar.tabTextColor(idx)
self.ui.plot_tab_area.tabBar.setTabTextColor(idx, QtGui.QColor('red'))
self.ui.pref_apply_button.setStyleSheet("QPushButton {color: red;}")