- a fix for the latest change in the Preferences Tab
This commit is contained in:
@@ -15,6 +15,7 @@ CHANGELOG for FlatCAM Evo beta
|
|||||||
- all CNCJob objects generated by the Solderpaste plugin now have the GCode saved as source_code which can be saved also from the CNCJob object context menu, and edited
|
- all CNCJob objects generated by the Solderpaste plugin now have the GCode saved as source_code which can be saved also from the CNCJob object context menu, and edited
|
||||||
- updated some custom widgets in the GUI elements such that the scrolling in the Preferences can be done without blocking on some of the widgets
|
- updated some custom widgets in the GUI elements such that the scrolling in the Preferences can be done without blocking on some of the widgets
|
||||||
- remade how the Preferences Tab is constructed such that now is made on demand for each section (tab) therefore making it faster to load (once a section is loaded - by clicking its tab - it will not be reloaded in the current session)
|
- remade how the Preferences Tab is constructed such that now is made on demand for each section (tab) therefore making it faster to load (once a section is loaded - by clicking its tab - it will not be reloaded in the current session)
|
||||||
|
- a fix for the latest change in the Preferences Tab
|
||||||
|
|
||||||
19.04.2022
|
19.04.2022
|
||||||
|
|
||||||
|
|||||||
@@ -809,6 +809,7 @@ class PreferencesUIManager(QtCore.QObject):
|
|||||||
|
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
|
self.init_preferences_gui()
|
||||||
|
|
||||||
self.pref_connect()
|
self.pref_connect()
|
||||||
|
|
||||||
@@ -818,6 +819,16 @@ class PreferencesUIManager(QtCore.QObject):
|
|||||||
# log.debug("Finished Preferences GUI form initialization.")
|
# log.debug("Finished Preferences GUI form initialization.")
|
||||||
|
|
||||||
def init_preferences_gui(self):
|
def init_preferences_gui(self):
|
||||||
|
self.general_displayed = False
|
||||||
|
self.gerber_displayed = False
|
||||||
|
self.excellon_displayed = False
|
||||||
|
self.geometry_displayed = False
|
||||||
|
self.cnc_displayed = False
|
||||||
|
self.engrave_displayed = False
|
||||||
|
self.plugins_displayed = False
|
||||||
|
self.plugins2_displayed = False
|
||||||
|
self.util_displayed = False
|
||||||
|
|
||||||
gen_form = self.ui.general_pref_form
|
gen_form = self.ui.general_pref_form
|
||||||
try:
|
try:
|
||||||
self.ui.general_scroll_area.takeWidget()
|
self.ui.general_scroll_area.takeWidget()
|
||||||
@@ -825,12 +836,10 @@ class PreferencesUIManager(QtCore.QObject):
|
|||||||
self.ui.app.log.debug("Nothing to remove")
|
self.ui.app.log.debug("Nothing to remove")
|
||||||
self.ui.general_scroll_area.setWidget(gen_form)
|
self.ui.general_scroll_area.setWidget(gen_form)
|
||||||
gen_form.show()
|
gen_form.show()
|
||||||
self.general_displayed = True
|
|
||||||
|
|
||||||
def pref_connect(self):
|
def pref_connect(self):
|
||||||
self.pref_disconnect()
|
self.pref_disconnect()
|
||||||
|
|
||||||
self.init_preferences_gui()
|
|
||||||
self.ui.pref_tab_area.tabBarClicked.connect(self.on_tab_clicked)
|
self.ui.pref_tab_area.tabBarClicked.connect(self.on_tab_clicked)
|
||||||
|
|
||||||
# Button handlers
|
# Button handlers
|
||||||
@@ -866,53 +875,52 @@ class PreferencesUIManager(QtCore.QObject):
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
|
||||||
self.ui.general_scroll_area.takeWidget()
|
|
||||||
except Exception:
|
|
||||||
self.ui.app.log.debug("Nothing to remove")
|
|
||||||
|
|
||||||
try:
|
|
||||||
self.ui.gerber_scroll_area.takeWidget()
|
|
||||||
except Exception:
|
|
||||||
self.ui.app.log.debug("Nothing to remove")
|
|
||||||
|
|
||||||
try:
|
|
||||||
self.ui.excellon_scroll_area.takeWidget()
|
|
||||||
except Exception:
|
|
||||||
self.ui.app.log.debug("Nothing to remove")
|
|
||||||
|
|
||||||
try:
|
|
||||||
self.ui.geometry_scroll_area.takeWidget()
|
|
||||||
except Exception:
|
|
||||||
self.ui.app.log.debug("Nothing to remove")
|
|
||||||
|
|
||||||
try:
|
|
||||||
self.ui.cncjob_scroll_area.takeWidget()
|
|
||||||
except Exception:
|
|
||||||
self.ui.app.log.debug("Nothing to remove")
|
|
||||||
|
|
||||||
try:
|
|
||||||
self.ui.plugins_engraving_scroll_area.takeWidget()
|
|
||||||
except Exception:
|
|
||||||
self.ui.app.log.debug("Nothing to remove")
|
|
||||||
|
|
||||||
try:
|
|
||||||
self.ui.tools_scroll_area.takeWidget()
|
|
||||||
except Exception:
|
|
||||||
self.ui.app.log.debug("Nothing to remove")
|
|
||||||
|
|
||||||
try:
|
|
||||||
self.ui.tools2_scroll_area.takeWidget()
|
|
||||||
except Exception:
|
|
||||||
self.ui.app.log.debug("Nothing to remove")
|
|
||||||
|
|
||||||
try:
|
|
||||||
self.ui.fa_scroll_area.takeWidget()
|
|
||||||
except Exception:
|
|
||||||
self.ui.app.log.debug("Nothing to remove")
|
|
||||||
|
|
||||||
def clear_preferences_gui(self):
|
def clear_preferences_gui(self):
|
||||||
self.pref_disconnect()
|
self.pref_disconnect()
|
||||||
|
# try:
|
||||||
|
# self.ui.general_scroll_area.takeWidget()
|
||||||
|
# except Exception:
|
||||||
|
# self.ui.app.log.debug("Nothing to remove")
|
||||||
|
#
|
||||||
|
# try:
|
||||||
|
# self.ui.gerber_scroll_area.takeWidget()
|
||||||
|
# except Exception:
|
||||||
|
# self.ui.app.log.debug("Nothing to remove")
|
||||||
|
#
|
||||||
|
# try:
|
||||||
|
# self.ui.excellon_scroll_area.takeWidget()
|
||||||
|
# except Exception:
|
||||||
|
# self.ui.app.log.debug("Nothing to remove")
|
||||||
|
#
|
||||||
|
# try:
|
||||||
|
# self.ui.geometry_scroll_area.takeWidget()
|
||||||
|
# except Exception:
|
||||||
|
# self.ui.app.log.debug("Nothing to remove")
|
||||||
|
#
|
||||||
|
# try:
|
||||||
|
# self.ui.cncjob_scroll_area.takeWidget()
|
||||||
|
# except Exception:
|
||||||
|
# self.ui.app.log.debug("Nothing to remove")
|
||||||
|
#
|
||||||
|
# try:
|
||||||
|
# self.ui.plugins_engraving_scroll_area.takeWidget()
|
||||||
|
# except Exception:
|
||||||
|
# self.ui.app.log.debug("Nothing to remove")
|
||||||
|
#
|
||||||
|
# try:
|
||||||
|
# self.ui.tools_scroll_area.takeWidget()
|
||||||
|
# except Exception:
|
||||||
|
# self.ui.app.log.debug("Nothing to remove")
|
||||||
|
#
|
||||||
|
# try:
|
||||||
|
# self.ui.tools2_scroll_area.takeWidget()
|
||||||
|
# except Exception:
|
||||||
|
# self.ui.app.log.debug("Nothing to remove")
|
||||||
|
#
|
||||||
|
# try:
|
||||||
|
# self.ui.fa_scroll_area.takeWidget()
|
||||||
|
# except Exception:
|
||||||
|
# self.ui.app.log.debug("Nothing to remove")
|
||||||
|
|
||||||
def on_tab_clicked(self, idx):
|
def on_tab_clicked(self, idx):
|
||||||
if idx == 0 and self.general_displayed is False:
|
if idx == 0 and self.general_displayed is False:
|
||||||
|
|||||||
Reference in New Issue
Block a user