- some changes on how the first layout is applied
- minor bug fixes (typos from copy/paste from another part of the program)
This commit is contained in:
parent
3daed4cbfb
commit
b79c26ec4b
|
@ -1640,13 +1640,11 @@ class App(QtCore.QObject):
|
|||
if not factory_defaults:
|
||||
self.save_factory_defaults(silent=False)
|
||||
# ONLY AT FIRST STARTUP INIT THE GUI LAYOUT TO 'COMPACT'
|
||||
initial_lay = 'compact'
|
||||
initial_lay = 'Compact'
|
||||
self.on_layout(index=None, lay=initial_lay)
|
||||
# Set the combobox in Preferences to the current layout
|
||||
idx = self.app.ui.general_defaults_form.general_gui_set_group.layout_combo.findText(
|
||||
initial_lay.capitalize()
|
||||
)
|
||||
self.app.ui.general_defaults_form.general_gui_set_group.layout_combo.setCurrentIndex(idx)
|
||||
idx = self.ui.general_defaults_form.general_gui_set_group.layout_combo.findText(initial_lay)
|
||||
self.ui.general_defaults_form.general_gui_set_group.layout_combo.setCurrentIndex(idx)
|
||||
factory_file.close()
|
||||
|
||||
# and then make the factory_defaults.FlatConfig file read_only os it can't be modified after creation.
|
||||
|
@ -3737,7 +3735,7 @@ class App(QtCore.QObject):
|
|||
if lay:
|
||||
current_layout = lay
|
||||
else:
|
||||
current_layout = self.ui.general_defaults_form.general_gui_set_group.layout_combo.get_value().lower()
|
||||
current_layout = self.ui.general_defaults_form.general_gui_set_group.layout_combo.get_value()
|
||||
|
||||
settings = QSettings("Open Source", "FlatCAM")
|
||||
settings.setValue('layout', current_layout)
|
||||
|
@ -3746,17 +3744,20 @@ class App(QtCore.QObject):
|
|||
del settings
|
||||
|
||||
# first remove the toolbars:
|
||||
self.ui.removeToolBar(self.ui.toolbarfile)
|
||||
self.ui.removeToolBar(self.ui.toolbargeo)
|
||||
self.ui.removeToolBar(self.ui.toolbarview)
|
||||
self.ui.removeToolBar(self.ui.toolbarshell)
|
||||
self.ui.removeToolBar(self.ui.toolbartools)
|
||||
self.ui.removeToolBar(self.ui.exc_edit_toolbar)
|
||||
self.ui.removeToolBar(self.ui.geo_edit_toolbar)
|
||||
self.ui.removeToolBar(self.ui.snap_toolbar)
|
||||
self.ui.removeToolBar(self.ui.toolbarshell)
|
||||
try:
|
||||
self.ui.removeToolBar(self.ui.toolbarfile)
|
||||
self.ui.removeToolBar(self.ui.toolbargeo)
|
||||
self.ui.removeToolBar(self.ui.toolbarview)
|
||||
self.ui.removeToolBar(self.ui.toolbarshell)
|
||||
self.ui.removeToolBar(self.ui.toolbartools)
|
||||
self.ui.removeToolBar(self.ui.exc_edit_toolbar)
|
||||
self.ui.removeToolBar(self.ui.geo_edit_toolbar)
|
||||
self.ui.removeToolBar(self.ui.snap_toolbar)
|
||||
self.ui.removeToolBar(self.ui.toolbarshell)
|
||||
except:
|
||||
pass
|
||||
|
||||
if current_layout == 'standard':
|
||||
if current_layout == 'Standard':
|
||||
### TOOLBAR INSTALLATION ###
|
||||
self.ui.toolbarfile = QtWidgets.QToolBar('File Toolbar')
|
||||
self.ui.toolbarfile.setObjectName('File_TB')
|
||||
|
@ -3795,7 +3796,7 @@ class App(QtCore.QObject):
|
|||
|
||||
self.ui.corner_snap_btn.setVisible(False)
|
||||
self.ui.snap_magnet.setVisible(False)
|
||||
elif current_layout == 'compact':
|
||||
elif current_layout == 'Compact':
|
||||
### TOOLBAR INSTALLATION ###
|
||||
self.ui.toolbarfile = QtWidgets.QToolBar('File Toolbar')
|
||||
self.ui.toolbarfile.setObjectName('File_TB')
|
||||
|
|
|
@ -3488,14 +3488,14 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
|||
settings = QSettings("Open Source", "FlatCAM")
|
||||
if settings.contains("layout"):
|
||||
layout = settings.value('layout', type=str)
|
||||
if layout == 'standard':
|
||||
if layout == 'Standard':
|
||||
# self.app.ui.geo_edit_toolbar.setVisible(False)
|
||||
|
||||
self.app.ui.snap_max_dist_entry.setEnabled(False)
|
||||
self.app.ui.corner_snap_btn.setEnabled(False)
|
||||
self.app.ui.snap_magnet.setVisible(False)
|
||||
self.app.ui.corner_snap_btn.setVisible(False)
|
||||
elif layout == 'compact':
|
||||
elif layout == 'Compact':
|
||||
# self.app.ui.geo_edit_toolbar.setVisible(True)
|
||||
|
||||
self.app.ui.snap_max_dist_entry.setEnabled(False)
|
||||
|
|
|
@ -18,6 +18,8 @@ CAD program, and create G-Code for Isolation routing.
|
|||
- finished translation in Romanian
|
||||
- made the translations work when the app is frozen with CX_freeze
|
||||
- some formatting changes for the application strings
|
||||
- some changes on how the first layout is applied
|
||||
- minor bug fixes (typos from copy/paste from another part of the program)
|
||||
|
||||
16.03.2019
|
||||
|
||||
|
|
|
@ -529,9 +529,9 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||
settings = QSettings("Open Source", "FlatCAM")
|
||||
if settings.contains("layout"):
|
||||
layout = settings.value('layout', type=str)
|
||||
if layout == 'standard':
|
||||
if layout == 'Standard':
|
||||
pass
|
||||
elif layout == 'compact':
|
||||
elif layout == 'Compact':
|
||||
self.removeToolBar(self.snap_toolbar)
|
||||
self.snap_toolbar.setMaximumHeight(30)
|
||||
self.splitter_left.addWidget(self.snap_toolbar)
|
||||
|
@ -1558,7 +1558,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||
|
||||
self.corner_snap_btn.setVisible(False)
|
||||
self.snap_magnet.setVisible(False)
|
||||
elif layout == 'compact':
|
||||
elif layout == 'Compact':
|
||||
self.exc_edit_toolbar.setDisabled(True)
|
||||
self.geo_edit_toolbar.setDisabled(True)
|
||||
self.snap_magnet.setVisible(True)
|
||||
|
@ -1732,7 +1732,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||
|
||||
self.corner_snap_btn.setVisible(False)
|
||||
self.snap_magnet.setVisible(False)
|
||||
elif layout == 'compact':
|
||||
elif layout == 'Compact':
|
||||
self.exc_edit_toolbar.setVisible(True)
|
||||
self.exc_edit_toolbar.setDisabled(True)
|
||||
self.geo_edit_toolbar.setVisible(True)
|
||||
|
|
Loading…
Reference in New Issue