|
|
@@ -1467,7 +1467,10 @@ class App(QtCore.QObject):
|
|
|
# if the file contain an empty dictionary then save the factory defaults into the file
|
|
|
if not factory_defaults:
|
|
|
self.save_factory_defaults(silent=False)
|
|
|
+ # ONLY AT FIRST STARTUP INIT THE GUI LAYOUT TO 'COMPACT'
|
|
|
+ self.on_layout(layout='compact')
|
|
|
factory_file.close()
|
|
|
+
|
|
|
# and then make the factory_defaults.FlatConfig file read_only os it can't be modified after creation.
|
|
|
filename_factory = self.data_path + '/factory_defaults.FlatConfig'
|
|
|
os.chmod(filename_factory, S_IREAD | S_IRGRP | S_IROTH)
|
|
|
@@ -3360,10 +3363,13 @@ class App(QtCore.QObject):
|
|
|
self.general_defaults_form.general_gui_group.workspace_cb.setChecked(True)
|
|
|
self.on_workspace()
|
|
|
|
|
|
- def on_layout(self):
|
|
|
+ def on_layout(self, layout=None):
|
|
|
self.report_usage("on_layout()")
|
|
|
|
|
|
- current_layout= self.general_defaults_form.general_gui_group.layout_combo.get_value().lower()
|
|
|
+ if layout is None:
|
|
|
+ current_layout= self.general_defaults_form.general_gui_group.layout_combo.get_value().lower()
|
|
|
+ else:
|
|
|
+ current_layout = layout
|
|
|
|
|
|
settings = QSettings("Open Source", "FlatCAM")
|
|
|
settings.setValue('layout', current_layout)
|