- fixed errors when the File -> New Project is initiated while an Editor is still active.
- the File->Exit action handler is now self.final_save()
This commit is contained in:
parent
bfd7cbdd44
commit
b202de338f
135
FlatCAMApp.py
135
FlatCAMApp.py
@ -36,6 +36,7 @@ from FlatCAMPostProc import load_postprocessors
|
|||||||
|
|
||||||
from flatcamEditors.FlatCAMGeoEditor import FlatCAMGeoEditor
|
from flatcamEditors.FlatCAMGeoEditor import FlatCAMGeoEditor
|
||||||
from flatcamEditors.FlatCAMExcEditor import FlatCAMExcEditor
|
from flatcamEditors.FlatCAMExcEditor import FlatCAMExcEditor
|
||||||
|
from flatcamEditors.FlatCAMGrbEditor import FlatCAMGrbEditor
|
||||||
|
|
||||||
from FlatCAMProcess import *
|
from FlatCAMProcess import *
|
||||||
from FlatCAMWorkerStack import WorkerStack
|
from FlatCAMWorkerStack import WorkerStack
|
||||||
@ -605,7 +606,7 @@ class App(QtCore.QObject):
|
|||||||
"global_draw_color": '#FF0000',
|
"global_draw_color": '#FF0000',
|
||||||
"global_sel_draw_color": '#0000FF',
|
"global_sel_draw_color": '#0000FF',
|
||||||
|
|
||||||
"global_toolbar_view": 127,
|
"global_toolbar_view": 511,
|
||||||
|
|
||||||
"global_background_timeout": 300000, # Default value is 5 minutes
|
"global_background_timeout": 300000, # Default value is 5 minutes
|
||||||
"global_verbose_error_level": 0, # Shell verbosity 0 = default
|
"global_verbose_error_level": 0, # Shell verbosity 0 = default
|
||||||
@ -1206,7 +1207,7 @@ class App(QtCore.QObject):
|
|||||||
### EDITOR section
|
### EDITOR section
|
||||||
self.geo_editor = FlatCAMGeoEditor(self, disabled=True)
|
self.geo_editor = FlatCAMGeoEditor(self, disabled=True)
|
||||||
self.exc_editor = FlatCAMExcEditor(self)
|
self.exc_editor = FlatCAMExcEditor(self)
|
||||||
|
self.grb_editor = FlatCAMGrbEditor(self)
|
||||||
|
|
||||||
#### Adjust tabs width ####
|
#### Adjust tabs width ####
|
||||||
# self.collection.view.setMinimumWidth(self.ui.options_scroll_area.widget().sizeHint().width() +
|
# self.collection.view.setMinimumWidth(self.ui.options_scroll_area.widget().sizeHint().width() +
|
||||||
@ -1268,7 +1269,7 @@ class App(QtCore.QObject):
|
|||||||
self.ui.menufilesaveprojectas.triggered.connect(self.on_file_saveprojectas)
|
self.ui.menufilesaveprojectas.triggered.connect(self.on_file_saveprojectas)
|
||||||
self.ui.menufilesaveprojectcopy.triggered.connect(lambda: self.on_file_saveprojectas(make_copy=True))
|
self.ui.menufilesaveprojectcopy.triggered.connect(lambda: self.on_file_saveprojectas(make_copy=True))
|
||||||
self.ui.menufilesavedefaults.triggered.connect(self.on_file_savedefaults)
|
self.ui.menufilesavedefaults.triggered.connect(self.on_file_savedefaults)
|
||||||
self.ui.menufile_exit.triggered.connect(self.on_app_exit)
|
self.ui.menufile_exit.triggered.connect(self.final_save)
|
||||||
|
|
||||||
self.ui.menueditedit.triggered.connect(self.object2editor)
|
self.ui.menueditedit.triggered.connect(self.object2editor)
|
||||||
self.ui.menueditok.triggered.connect(self.editor2object)
|
self.ui.menueditok.triggered.connect(self.editor2object)
|
||||||
@ -2096,6 +2097,15 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
# set call source to the Editor we go into
|
# set call source to the Editor we go into
|
||||||
self.call_source = 'exc_editor'
|
self.call_source = 'exc_editor'
|
||||||
|
|
||||||
|
elif isinstance(edited_object, FlatCAMGerber):
|
||||||
|
# store the Gerber Editor Toolbar visibility before entering in the Editor
|
||||||
|
self.grbeditor.toolbar_old_state = True if self.ui.grb_edit_toolbar.isVisible() else False
|
||||||
|
self.grbeditor.edit_fcgerber(edited_object)
|
||||||
|
|
||||||
|
# set call source to the Editor we go into
|
||||||
|
self.call_source = 'grb_editor'
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.inform.emit(_("[WARNING_NOTCL] Select a Geometry or Excellon Object to edit."))
|
self.inform.emit(_("[WARNING_NOTCL] Select a Geometry or Excellon Object to edit."))
|
||||||
return
|
return
|
||||||
@ -2112,7 +2122,7 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
self.should_we_save = True
|
self.should_we_save = True
|
||||||
|
|
||||||
def editor2object(self):
|
def editor2object(self, cleanup=None):
|
||||||
"""
|
"""
|
||||||
Transfers the Geometry or Excellon from the editor to the current object.
|
Transfers the Geometry or Excellon from the editor to the current object.
|
||||||
|
|
||||||
@ -2135,8 +2145,9 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
if isinstance(edited_obj, FlatCAMGeometry):
|
if isinstance(edited_obj, FlatCAMGeometry):
|
||||||
obj_type = "Geometry"
|
obj_type = "Geometry"
|
||||||
self.geo_editor.update_fcgeometry(edited_obj)
|
if cleanup is None:
|
||||||
self.geo_editor.update_options(edited_obj)
|
self.geo_editor.update_fcgeometry(edited_obj)
|
||||||
|
self.geo_editor.update_options(edited_obj)
|
||||||
self.geo_editor.deactivate()
|
self.geo_editor.deactivate()
|
||||||
|
|
||||||
# update the geo object options so it is including the bounding box values
|
# update the geo object options so it is including the bounding box values
|
||||||
@ -2149,14 +2160,32 @@ class App(QtCore.QObject):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
self.inform.emit(_("[WARNING] Object empty after edit."))
|
self.inform.emit(_("[WARNING] Object empty after edit."))
|
||||||
|
|
||||||
|
if isinstance(edited_obj, FlatCAMGerber):
|
||||||
|
obj_type = "Gerber"
|
||||||
|
if cleanup is None:
|
||||||
|
self.grb_editor.update_fcgerber(edited_obj)
|
||||||
|
self.grb_editor.update_options(edited_obj)
|
||||||
|
self.grb_editor.deactivate()
|
||||||
|
|
||||||
|
# update the geo object options so it is including the bounding box values
|
||||||
|
try:
|
||||||
|
xmin, ymin, xmax, ymax = edited_obj.bounds()
|
||||||
|
edited_obj.options['xmin'] = xmin
|
||||||
|
edited_obj.options['ymin'] = ymin
|
||||||
|
edited_obj.options['xmax'] = xmax
|
||||||
|
edited_obj.options['ymax'] = ymax
|
||||||
|
except AttributeError:
|
||||||
|
self.inform.emit(_("[WARNING] Object empty after edit."))
|
||||||
|
|
||||||
elif isinstance(edited_obj, FlatCAMExcellon):
|
elif isinstance(edited_obj, FlatCAMExcellon):
|
||||||
obj_type = "Excellon"
|
obj_type = "Excellon"
|
||||||
self.exc_editor.update_fcexcellon(edited_obj)
|
if cleanup is None:
|
||||||
self.exc_editor.update_options(edited_obj)
|
self.exc_editor.update_fcexcellon(edited_obj)
|
||||||
|
self.exc_editor.update_options(edited_obj)
|
||||||
self.exc_editor.deactivate()
|
self.exc_editor.deactivate()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.inform.emit(_("[WARNING_NOTCL] Select a Geometry or Excellon Object to update."))
|
self.inform.emit(_("[WARNING_NOTCL] Select a Gerber, Geometry or Excellon Object to update."))
|
||||||
return
|
return
|
||||||
|
|
||||||
# if notebook is hidden we show it
|
# if notebook is hidden we show it
|
||||||
@ -2470,11 +2499,16 @@ class App(QtCore.QObject):
|
|||||||
self.ui.geo_edit_toolbar.setVisible(False)
|
self.ui.geo_edit_toolbar.setVisible(False)
|
||||||
|
|
||||||
if tb & 64:
|
if tb & 64:
|
||||||
|
self.ui.grb_edit_toolbar.setVisible(True)
|
||||||
|
else:
|
||||||
|
self.ui.grb_edit_toolbar.setVisible(False)
|
||||||
|
|
||||||
|
if tb & 128:
|
||||||
self.ui.snap_toolbar.setVisible(True)
|
self.ui.snap_toolbar.setVisible(True)
|
||||||
else:
|
else:
|
||||||
self.ui.snap_toolbar.setVisible(False)
|
self.ui.snap_toolbar.setVisible(False)
|
||||||
|
|
||||||
if tb & 128:
|
if tb & 256:
|
||||||
self.ui.toolbarshell.setVisible(True)
|
self.ui.toolbarshell.setVisible(True)
|
||||||
else:
|
else:
|
||||||
self.ui.toolbarshell.setVisible(False)
|
self.ui.toolbarshell.setVisible(False)
|
||||||
@ -2494,14 +2528,14 @@ class App(QtCore.QObject):
|
|||||||
self.log.error("Could not load defaults file.")
|
self.log.error("Could not load defaults file.")
|
||||||
self.inform.emit(_("[ERROR] Could not load defaults file."))
|
self.inform.emit(_("[ERROR] Could not load defaults file."))
|
||||||
# in case the defaults file can't be loaded, show all toolbars
|
# in case the defaults file can't be loaded, show all toolbars
|
||||||
self.defaults["global_toolbar_view"] = 255
|
self.defaults["global_toolbar_view"] = 511
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
defaults = json.loads(options)
|
defaults = json.loads(options)
|
||||||
except:
|
except:
|
||||||
# in case the defaults file can't be loaded, show all toolbars
|
# in case the defaults file can't be loaded, show all toolbars
|
||||||
self.defaults["global_toolbar_view"] = 255
|
self.defaults["global_toolbar_view"] = 511
|
||||||
e = sys.exc_info()[0]
|
e = sys.exc_info()[0]
|
||||||
App.log.error(str(e))
|
App.log.error(str(e))
|
||||||
self.inform.emit(_("[ERROR] Failed to parse defaults file."))
|
self.inform.emit(_("[ERROR] Failed to parse defaults file."))
|
||||||
@ -2976,32 +3010,32 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
self.save_defaults()
|
self.save_defaults()
|
||||||
|
|
||||||
def on_app_exit(self):
|
# def on_app_exit(self):
|
||||||
self.report_usage("on_app_exit()")
|
# self.report_usage("on_app_exit()")
|
||||||
|
#
|
||||||
if self.collection.get_list():
|
# if self.collection.get_list():
|
||||||
msgbox = QtWidgets.QMessageBox()
|
# msgbox = QtWidgets.QMessageBox()
|
||||||
# msgbox.setText("<B>Save changes ...</B>")
|
# # msgbox.setText("<B>Save changes ...</B>")
|
||||||
msgbox.setText("There are files/objects opened in FlatCAM. "
|
# msgbox.setText("There are files/objects opened in FlatCAM. "
|
||||||
"\n"
|
# "\n"
|
||||||
"Do you want to Save the project?")
|
# "Do you want to Save the project?")
|
||||||
msgbox.setWindowTitle("Save changes")
|
# msgbox.setWindowTitle("Save changes")
|
||||||
msgbox.setWindowIcon(QtGui.QIcon('share/save_as.png'))
|
# msgbox.setWindowIcon(QtGui.QIcon('share/save_as.png'))
|
||||||
msgbox.setStandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No |
|
# msgbox.setStandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No |
|
||||||
QtWidgets.QMessageBox.Cancel)
|
# QtWidgets.QMessageBox.Cancel)
|
||||||
msgbox.setDefaultButton(QtWidgets.QMessageBox.Yes)
|
# msgbox.setDefaultButton(QtWidgets.QMessageBox.Yes)
|
||||||
|
#
|
||||||
response = msgbox.exec_()
|
# response = msgbox.exec_()
|
||||||
|
#
|
||||||
if response == QtWidgets.QMessageBox.Yes:
|
# if response == QtWidgets.QMessageBox.Yes:
|
||||||
self.on_file_saveprojectas(thread=False)
|
# self.on_file_saveprojectas(thread=False)
|
||||||
elif response == QtWidgets.QMessageBox.Cancel:
|
# elif response == QtWidgets.QMessageBox.Cancel:
|
||||||
return
|
# return
|
||||||
self.save_defaults()
|
# self.save_defaults()
|
||||||
else:
|
# else:
|
||||||
self.save_defaults()
|
# self.save_defaults()
|
||||||
log.debug("Application defaults saved ... Exit event.")
|
# log.debug("Application defaults saved ... Exit event.")
|
||||||
QtWidgets.qApp.quit()
|
# QtWidgets.qApp.quit()
|
||||||
|
|
||||||
def save_defaults(self, silent=False):
|
def save_defaults(self, silent=False):
|
||||||
"""
|
"""
|
||||||
@ -3067,12 +3101,15 @@ class App(QtCore.QObject):
|
|||||||
if self.ui.geo_edit_toolbar.isVisible():
|
if self.ui.geo_edit_toolbar.isVisible():
|
||||||
tb_status += 32
|
tb_status += 32
|
||||||
|
|
||||||
if self.ui.snap_toolbar.isVisible():
|
if self.ui.grb_edit_toolbar.isVisible():
|
||||||
tb_status += 64
|
tb_status += 64
|
||||||
|
|
||||||
if self.ui.toolbarshell.isVisible():
|
if self.ui.snap_toolbar.isVisible():
|
||||||
tb_status += 128
|
tb_status += 128
|
||||||
|
|
||||||
|
if self.ui.toolbarshell.isVisible():
|
||||||
|
tb_status += 256
|
||||||
|
|
||||||
self.defaults["global_toolbar_view"] = tb_status
|
self.defaults["global_toolbar_view"] = tb_status
|
||||||
|
|
||||||
if not silent:
|
if not silent:
|
||||||
@ -3945,6 +3982,7 @@ class App(QtCore.QObject):
|
|||||||
self.ui.removeToolBar(self.ui.toolbartools)
|
self.ui.removeToolBar(self.ui.toolbartools)
|
||||||
self.ui.removeToolBar(self.ui.exc_edit_toolbar)
|
self.ui.removeToolBar(self.ui.exc_edit_toolbar)
|
||||||
self.ui.removeToolBar(self.ui.geo_edit_toolbar)
|
self.ui.removeToolBar(self.ui.geo_edit_toolbar)
|
||||||
|
self.ui.removeToolBar(self.ui.grb_edit_toolbar)
|
||||||
self.ui.removeToolBar(self.ui.snap_toolbar)
|
self.ui.removeToolBar(self.ui.snap_toolbar)
|
||||||
self.ui.removeToolBar(self.ui.toolbarshell)
|
self.ui.removeToolBar(self.ui.toolbarshell)
|
||||||
except:
|
except:
|
||||||
@ -3982,6 +4020,11 @@ class App(QtCore.QObject):
|
|||||||
self.ui.geo_edit_toolbar.setObjectName('GeoEditor_TB')
|
self.ui.geo_edit_toolbar.setObjectName('GeoEditor_TB')
|
||||||
self.ui.addToolBar(self.ui.geo_edit_toolbar)
|
self.ui.addToolBar(self.ui.geo_edit_toolbar)
|
||||||
|
|
||||||
|
self.ui.grb_edit_toolbar = QtWidgets.QToolBar('Gerber Editor Toolbar')
|
||||||
|
self.ui.grb_edit_toolbar.setVisible(False)
|
||||||
|
self.ui.grb_edit_toolbar.setObjectName('GrbEditor_TB')
|
||||||
|
self.ui.addToolBar(self.ui.grb_edit_toolbar)
|
||||||
|
|
||||||
self.ui.snap_toolbar = QtWidgets.QToolBar('Grid Toolbar')
|
self.ui.snap_toolbar = QtWidgets.QToolBar('Grid Toolbar')
|
||||||
self.ui.snap_toolbar.setObjectName('Snap_TB')
|
self.ui.snap_toolbar.setObjectName('Snap_TB')
|
||||||
# self.ui.snap_toolbar.setMaximumHeight(30)
|
# self.ui.snap_toolbar.setMaximumHeight(30)
|
||||||
@ -4014,6 +4057,11 @@ class App(QtCore.QObject):
|
|||||||
self.ui.geo_edit_toolbar.setObjectName('GeoEditor_TB')
|
self.ui.geo_edit_toolbar.setObjectName('GeoEditor_TB')
|
||||||
self.ui.addToolBar(Qt.RightToolBarArea, self.ui.geo_edit_toolbar)
|
self.ui.addToolBar(Qt.RightToolBarArea, self.ui.geo_edit_toolbar)
|
||||||
|
|
||||||
|
self.ui.grb_edit_toolbar = QtWidgets.QToolBar('Gerber Editor Toolbar')
|
||||||
|
# self.ui.grb_edit_toolbar.setVisible(False)
|
||||||
|
self.ui.grb_edit_toolbar.setObjectName('GrbEditor_TB')
|
||||||
|
self.ui.addToolBar(Qt.RightToolBarArea, self.ui.grb_edit_toolbar)
|
||||||
|
|
||||||
self.ui.exc_edit_toolbar = QtWidgets.QToolBar('Excellon Editor Toolbar')
|
self.ui.exc_edit_toolbar = QtWidgets.QToolBar('Excellon Editor Toolbar')
|
||||||
self.ui.exc_edit_toolbar.setObjectName('ExcEditor_TB')
|
self.ui.exc_edit_toolbar.setObjectName('ExcEditor_TB')
|
||||||
self.ui.addToolBar(Qt.RightToolBarArea, self.ui.exc_edit_toolbar)
|
self.ui.addToolBar(Qt.RightToolBarArea, self.ui.exc_edit_toolbar)
|
||||||
@ -5446,6 +5494,13 @@ class App(QtCore.QObject):
|
|||||||
# Remove everything from memory
|
# Remove everything from memory
|
||||||
App.log.debug("on_file_new()")
|
App.log.debug("on_file_new()")
|
||||||
|
|
||||||
|
if self.call_source != 'app':
|
||||||
|
self.editor2object(cleanup=True)
|
||||||
|
### EDITOR section
|
||||||
|
self.geo_editor = FlatCAMGeoEditor(self, disabled=True)
|
||||||
|
self.exc_editor = FlatCAMExcEditor(self)
|
||||||
|
self.grb_editor = FlatCAMGrbEditor(self)
|
||||||
|
|
||||||
# Clear pool
|
# Clear pool
|
||||||
self.clear_pool()
|
self.clear_pool()
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
- fixed issue #281 by making generation of a convex shape for the freeform cutout in Tool Cutout a choice rather than the default
|
- fixed issue #281 by making generation of a convex shape for the freeform cutout in Tool Cutout a choice rather than the default
|
||||||
- fixed bug in Tool Cutout, now in manual cutout mode the gap size reflect the value set
|
- fixed bug in Tool Cutout, now in manual cutout mode the gap size reflect the value set
|
||||||
- changed Measuring Tool to use the mouse click release instead of mouse click press; also fixed a bug when using the ESC key.
|
- changed Measuring Tool to use the mouse click release instead of mouse click press; also fixed a bug when using the ESC key.
|
||||||
|
- fixed errors when the File -> New Project is initiated while an Editor is still active.
|
||||||
|
- the File->Exit action handler is now self.final_save()
|
||||||
|
|
||||||
29.03.2019
|
29.03.2019
|
||||||
|
|
||||||
|
@ -830,7 +830,7 @@ class FlatCAMExcEditor(QtCore.QObject):
|
|||||||
res_entry_lbl.setToolTip(
|
res_entry_lbl.setToolTip(
|
||||||
_( "Diameter to resize to.")
|
_( "Diameter to resize to.")
|
||||||
)
|
)
|
||||||
grid3.addWidget(addtool_entry_lbl, 0, 0)
|
grid3.addWidget(res_entry_lbl, 0, 0)
|
||||||
|
|
||||||
hlay2 = QtWidgets.QHBoxLayout()
|
hlay2 = QtWidgets.QHBoxLayout()
|
||||||
self.resdrill_entry = LengthEntry()
|
self.resdrill_entry = LengthEntry()
|
||||||
|
@ -2823,6 +2823,8 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
|||||||
|
|
||||||
self.app.ui.geo_edit_toolbar.setDisabled(False)
|
self.app.ui.geo_edit_toolbar.setDisabled(False)
|
||||||
self.app.ui.geo_edit_toolbar.setVisible(True)
|
self.app.ui.geo_edit_toolbar.setVisible(True)
|
||||||
|
self.app.ui.grb_edit_toolbar.setDisabled(False)
|
||||||
|
self.app.ui.grb_edit_toolbar.setVisible(True)
|
||||||
self.app.ui.snap_toolbar.setDisabled(False)
|
self.app.ui.snap_toolbar.setDisabled(False)
|
||||||
|
|
||||||
# prevent the user to change anything in the Selected Tab while the Geo Editor is active
|
# prevent the user to change anything in the Selected Tab while the Geo Editor is active
|
||||||
|
@ -26,7 +26,7 @@ class FCApertureResize(FCShapeTool):
|
|||||||
DrawTool.__init__(self, draw_app)
|
DrawTool.__init__(self, draw_app)
|
||||||
self.name = 'aperture_resize'
|
self.name = 'aperture_resize'
|
||||||
|
|
||||||
self.draw_app.app.inform.emit(_("Click on the Drill(s) to resize ..."))
|
self.draw_app.app.inform.emit(_("Click on the Apertures to resize ..."))
|
||||||
self.resize_dia = None
|
self.resize_dia = None
|
||||||
self.draw_app.resize_frame.show()
|
self.draw_app.resize_frame.show()
|
||||||
self.points = None
|
self.points = None
|
||||||
@ -370,9 +370,9 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||||||
## Current application units in Upper Case
|
## Current application units in Upper Case
|
||||||
self.units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
|
self.units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
|
||||||
|
|
||||||
self.exc_edit_widget = QtWidgets.QWidget()
|
self.grb_edit_widget = QtWidgets.QWidget()
|
||||||
layout = QtWidgets.QVBoxLayout()
|
layout = QtWidgets.QVBoxLayout()
|
||||||
self.exc_edit_widget.setLayout(layout)
|
self.grb_edit_widget.setLayout(layout)
|
||||||
|
|
||||||
## Page Title box (spacing between children)
|
## Page Title box (spacing between children)
|
||||||
self.title_box = QtWidgets.QHBoxLayout()
|
self.title_box = QtWidgets.QHBoxLayout()
|
||||||
@ -397,110 +397,118 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||||||
self.name_entry = FCEntry()
|
self.name_entry = FCEntry()
|
||||||
self.name_box.addWidget(self.name_entry)
|
self.name_box.addWidget(self.name_entry)
|
||||||
|
|
||||||
## Box box for custom widgets
|
## Box for custom widgets
|
||||||
# This gets populated in offspring implementations.
|
# This gets populated in offspring implementations.
|
||||||
self.custom_box = QtWidgets.QVBoxLayout()
|
self.custom_box = QtWidgets.QVBoxLayout()
|
||||||
layout.addLayout(self.custom_box)
|
layout.addLayout(self.custom_box)
|
||||||
|
|
||||||
# add a frame and inside add a vertical box layout. Inside this vbox layout I add all the Drills widgets
|
# add a frame and inside add a vertical box layout. Inside this vbox layout I add all the Drills widgets
|
||||||
# this way I can hide/show the frame
|
# this way I can hide/show the frame
|
||||||
self.drills_frame = QtWidgets.QFrame()
|
self.apertures_frame = QtWidgets.QFrame()
|
||||||
self.drills_frame.setContentsMargins(0, 0, 0, 0)
|
self.apertures_frame.setContentsMargins(0, 0, 0, 0)
|
||||||
self.custom_box.addWidget(self.drills_frame)
|
self.custom_box.addWidget(self.apertures_frame)
|
||||||
self.tools_box = QtWidgets.QVBoxLayout()
|
self.apertures_box = QtWidgets.QVBoxLayout()
|
||||||
self.tools_box.setContentsMargins(0, 0, 0, 0)
|
self.apertures_box.setContentsMargins(0, 0, 0, 0)
|
||||||
self.drills_frame.setLayout(self.tools_box)
|
self.apertures_frame.setLayout(self.apertures_box)
|
||||||
|
|
||||||
#### Tools Drills ####
|
#### Gerber Apertures ####
|
||||||
self.tools_table_label = QtWidgets.QLabel("<b>%s</b>" % _('Tools Table'))
|
self.apertures_table_label = QtWidgets.QLabel(_('<b>Apertures:</b>'))
|
||||||
self.tools_table_label.setToolTip(
|
self.apertures_table_label.setToolTip(
|
||||||
_( "Tools in this Excellon object\n"
|
_("Apertures Table for the Gerber Object.")
|
||||||
"when are used for drilling.")
|
|
||||||
)
|
)
|
||||||
self.tools_box.addWidget(self.tools_table_label)
|
self.apertures_box.addWidget(self.apertures_table_label)
|
||||||
|
|
||||||
self.tools_table_exc = FCTable()
|
self.apertures_table = FCTable()
|
||||||
# delegate = SpinBoxDelegate(units=self.units)
|
# delegate = SpinBoxDelegate(units=self.units)
|
||||||
# self.tools_table_exc.setItemDelegateForColumn(1, delegate)
|
# self.tools_table_exc.setItemDelegateForColumn(1, delegate)
|
||||||
|
|
||||||
self.tools_box.addWidget(self.tools_table_exc)
|
self.apertures_box.addWidget(self.apertures_table)
|
||||||
|
|
||||||
self.tools_table_exc.setColumnCount(4)
|
self.apertures_table.setColumnCount(5)
|
||||||
self.tools_table_exc.setHorizontalHeaderLabels(['#', _('Diameter'), 'D', 'S'])
|
self.apertures_table.setHorizontalHeaderLabels(['#', _('Code'), _('Type'), _('Size'), _('Dim')])
|
||||||
self.tools_table_exc.setSortingEnabled(False)
|
self.apertures_table.setSortingEnabled(False)
|
||||||
self.tools_table_exc.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
|
|
||||||
|
self.apertures_table.horizontalHeaderItem(0).setToolTip(
|
||||||
|
_("Index"))
|
||||||
|
self.apertures_table.horizontalHeaderItem(1).setToolTip(
|
||||||
|
_("Aperture Code"))
|
||||||
|
self.apertures_table.horizontalHeaderItem(2).setToolTip(
|
||||||
|
_("Type of aperture: circular, rectangle, macros etc"))
|
||||||
|
self.apertures_table.horizontalHeaderItem(4).setToolTip(
|
||||||
|
_("Aperture Size:"))
|
||||||
|
self.apertures_table.horizontalHeaderItem(4).setToolTip(
|
||||||
|
_("Aperture Dimensions:\n"
|
||||||
|
" - (width, height) for R, O type.\n"
|
||||||
|
" - (dia, nVertices) for P type"))
|
||||||
|
|
||||||
self.empty_label = QtWidgets.QLabel('')
|
self.empty_label = QtWidgets.QLabel('')
|
||||||
self.tools_box.addWidget(self.empty_label)
|
self.apertures_box.addWidget(self.empty_label)
|
||||||
|
|
||||||
#### Add a new Tool ####
|
#### Add a new Tool ####
|
||||||
self.addtool_label = QtWidgets.QLabel('<b>%s</b>' % _('Add/Delete Tool'))
|
self.addaperture_label = QtWidgets.QLabel('<b>%s</b>' % _('Add/Delete Aperture'))
|
||||||
self.addtool_label.setToolTip(
|
self.addaperture_label.setToolTip(
|
||||||
_("Add/Delete a tool to the tool list\n"
|
_("Add/Delete an aperture to the aperture list")
|
||||||
"for this Excellon object.")
|
|
||||||
)
|
)
|
||||||
self.tools_box.addWidget(self.addtool_label)
|
self.apertures_box.addWidget(self.addaperture_label)
|
||||||
|
|
||||||
grid1 = QtWidgets.QGridLayout()
|
grid1 = QtWidgets.QGridLayout()
|
||||||
self.tools_box.addLayout(grid1)
|
self.apertures_box.addLayout(grid1)
|
||||||
|
|
||||||
addtool_entry_lbl = QtWidgets.QLabel(_('Tool Dia:'))
|
addaperture_entry_lbl = QtWidgets.QLabel(_('Aperture Size:'))
|
||||||
addtool_entry_lbl.setToolTip(
|
addaperture_entry_lbl.setToolTip(
|
||||||
_("Diameter for the new tool")
|
_("Size for the new aperture")
|
||||||
)
|
)
|
||||||
grid1.addWidget(addtool_entry_lbl, 0, 0)
|
grid1.addWidget(addaperture_entry_lbl, 0, 0)
|
||||||
|
|
||||||
hlay = QtWidgets.QHBoxLayout()
|
hlay = QtWidgets.QHBoxLayout()
|
||||||
self.addtool_entry = FCEntry()
|
self.addtool_entry = FCEntry()
|
||||||
self.addtool_entry.setValidator(QtGui.QDoubleValidator(0.0001, 99.9999, 4))
|
self.addtool_entry.setValidator(QtGui.QDoubleValidator(0.0001, 99.9999, 4))
|
||||||
hlay.addWidget(self.addtool_entry)
|
hlay.addWidget(self.addtool_entry)
|
||||||
|
|
||||||
self.addtool_btn = QtWidgets.QPushButton(_('Add Tool'))
|
self.addaperture_btn = QtWidgets.QPushButton(_('Add Aperture'))
|
||||||
self.addtool_btn.setToolTip(
|
self.addaperture_btn.setToolTip(
|
||||||
_( "Add a new tool to the tool list\n"
|
_( "Add a new aperture to the aperture list")
|
||||||
"with the diameter specified above.")
|
|
||||||
)
|
)
|
||||||
self.addtool_btn.setFixedWidth(80)
|
self.addaperture_btn.setFixedWidth(80)
|
||||||
hlay.addWidget(self.addtool_btn)
|
hlay.addWidget(self.addaperture_btn)
|
||||||
grid1.addLayout(hlay, 0, 1)
|
grid1.addLayout(hlay, 0, 1)
|
||||||
|
|
||||||
grid2 = QtWidgets.QGridLayout()
|
grid2 = QtWidgets.QGridLayout()
|
||||||
self.tools_box.addLayout(grid2)
|
self.apertures_box.addLayout(grid2)
|
||||||
|
|
||||||
self.deltool_btn = QtWidgets.QPushButton(_('Delete Tool'))
|
self.delaperture_btn = QtWidgets.QPushButton(_('Delete Aperture'))
|
||||||
self.deltool_btn.setToolTip(
|
self.delaperture_btn.setToolTip(
|
||||||
_( "Delete a tool in the tool list\n"
|
_( "Delete a aperture in the aperture list")
|
||||||
"by selecting a row in the tool table.")
|
|
||||||
)
|
)
|
||||||
grid2.addWidget(self.deltool_btn, 0, 1)
|
grid2.addWidget(self.delaperture_btn, 0, 1)
|
||||||
|
|
||||||
# add a frame and inside add a vertical box layout. Inside this vbox layout I add all the Drills widgets
|
# add a frame and inside add a vertical box layout. Inside this vbox layout I add all the aperture widgets
|
||||||
# this way I can hide/show the frame
|
# this way I can hide/show the frame
|
||||||
self.resize_frame = QtWidgets.QFrame()
|
self.resize_frame = QtWidgets.QFrame()
|
||||||
self.resize_frame.setContentsMargins(0, 0, 0, 0)
|
self.resize_frame.setContentsMargins(0, 0, 0, 0)
|
||||||
self.tools_box.addWidget(self.resize_frame)
|
self.apertures_box.addWidget(self.resize_frame)
|
||||||
self.resize_box = QtWidgets.QVBoxLayout()
|
self.resize_box = QtWidgets.QVBoxLayout()
|
||||||
self.resize_box.setContentsMargins(0, 0, 0, 0)
|
self.resize_box.setContentsMargins(0, 0, 0, 0)
|
||||||
self.resize_frame.setLayout(self.resize_box)
|
self.resize_frame.setLayout(self.resize_box)
|
||||||
|
|
||||||
#### Resize a drill ####
|
#### Resize a aperture ####
|
||||||
self.emptyresize_label = QtWidgets.QLabel('')
|
self.emptyresize_label = QtWidgets.QLabel('')
|
||||||
self.resize_box.addWidget(self.emptyresize_label)
|
self.resize_box.addWidget(self.emptyresize_label)
|
||||||
|
|
||||||
self.drillresize_label = QtWidgets.QLabel('<b>%s</b>' % _("Resize Drill(s)"))
|
self.apertureresize_label = QtWidgets.QLabel('<b>%s</b>' % _("Resize Aperture"))
|
||||||
self.drillresize_label.setToolTip(
|
self.apertureresize_label.setToolTip(
|
||||||
_("Resize a drill or a selection of drills.")
|
_("Resize a aperture or a selection of apertures.")
|
||||||
)
|
)
|
||||||
self.resize_box.addWidget(self.drillresize_label)
|
self.resize_box.addWidget(self.apertureresize_label)
|
||||||
|
|
||||||
grid3 = QtWidgets.QGridLayout()
|
grid3 = QtWidgets.QGridLayout()
|
||||||
self.resize_box.addLayout(grid3)
|
self.resize_box.addLayout(grid3)
|
||||||
|
|
||||||
res_entry_lbl = QtWidgets.QLabel(_('Resize Dia:'))
|
res_entry_lbl = QtWidgets.QLabel(_('Resize Dia:'))
|
||||||
res_entry_lbl.setToolTip(
|
res_entry_lbl.setToolTip(
|
||||||
_( "Diameter to resize to.")
|
_( "Size to resize to.")
|
||||||
)
|
)
|
||||||
grid3.addWidget(addtool_entry_lbl, 0, 0)
|
grid3.addWidget(res_entry_lbl, 0, 0)
|
||||||
|
|
||||||
hlay2 = QtWidgets.QHBoxLayout()
|
hlay2 = QtWidgets.QHBoxLayout()
|
||||||
self.resdrill_entry = LengthEntry()
|
self.resdrill_entry = LengthEntry()
|
||||||
@ -521,7 +529,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||||||
# this way I can hide/show the frame
|
# this way I can hide/show the frame
|
||||||
self.array_frame = QtWidgets.QFrame()
|
self.array_frame = QtWidgets.QFrame()
|
||||||
self.array_frame.setContentsMargins(0, 0, 0, 0)
|
self.array_frame.setContentsMargins(0, 0, 0, 0)
|
||||||
self.tools_box.addWidget(self.array_frame)
|
self.apertures_box.addWidget(self.array_frame)
|
||||||
self.array_box = QtWidgets.QVBoxLayout()
|
self.array_box = QtWidgets.QVBoxLayout()
|
||||||
self.array_box.setContentsMargins(0, 0, 0, 0)
|
self.array_box.setContentsMargins(0, 0, 0, 0)
|
||||||
self.array_frame.setLayout(self.array_box)
|
self.array_frame.setLayout(self.array_box)
|
||||||
@ -643,22 +651,18 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||||||
self.linear_angle_label.hide()
|
self.linear_angle_label.hide()
|
||||||
|
|
||||||
self.array_frame.hide()
|
self.array_frame.hide()
|
||||||
self.tools_box.addStretch()
|
self.apertures_box.addStretch()
|
||||||
|
|
||||||
## Toolbar events and properties
|
## Toolbar events and properties
|
||||||
self.tools_exc = {
|
self.tools_exc = {
|
||||||
"select": {"button": self.app.ui.select_drill_btn,
|
"select": {"button": self.app.ui.select_drill_btn,
|
||||||
"constructor": FCDrillSelect},
|
"constructor": FCApertureSelect},
|
||||||
"drill_add": {"button": self.app.ui.add_drill_btn,
|
|
||||||
"constructor": FCDrillAdd},
|
|
||||||
"drill_array": {"button": self.app.ui.add_drill_array_btn,
|
|
||||||
"constructor": FCDrillArray},
|
|
||||||
"drill_resize": {"button": self.app.ui.resize_drill_btn,
|
"drill_resize": {"button": self.app.ui.resize_drill_btn,
|
||||||
"constructor": FCDrillResize},
|
"constructor": FCApertureResize},
|
||||||
"drill_copy": {"button": self.app.ui.copy_drill_btn,
|
"drill_copy": {"button": self.app.ui.copy_drill_btn,
|
||||||
"constructor": FCDrillCopy},
|
"constructor": FCApertureCopy},
|
||||||
"drill_move": {"button": self.app.ui.move_drill_btn,
|
"drill_move": {"button": self.app.ui.move_drill_btn,
|
||||||
"constructor": FCDrillMove},
|
"constructor": FCApertureMove},
|
||||||
}
|
}
|
||||||
|
|
||||||
### Data
|
### Data
|
||||||
@ -696,16 +700,14 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||||||
|
|
||||||
self.app.ui.delete_drill_btn.triggered.connect(self.on_delete_btn)
|
self.app.ui.delete_drill_btn.triggered.connect(self.on_delete_btn)
|
||||||
self.name_entry.returnPressed.connect(self.on_name_activate)
|
self.name_entry.returnPressed.connect(self.on_name_activate)
|
||||||
self.addtool_btn.clicked.connect(self.on_tool_add)
|
self.addaperture_btn.clicked.connect(self.on_tool_add)
|
||||||
# self.addtool_entry.editingFinished.connect(self.on_tool_add)
|
# self.addtool_entry.editingFinished.connect(self.on_tool_add)
|
||||||
self.deltool_btn.clicked.connect(self.on_tool_delete)
|
self.delaperture_btn.clicked.connect(self.on_tool_delete)
|
||||||
self.tools_table_exc.selectionModel().currentChanged.connect(self.on_row_selected)
|
self.apertures_table.selectionModel().currentChanged.connect(self.on_row_selected)
|
||||||
self.array_type_combo.currentIndexChanged.connect(self.on_array_type_combo)
|
self.array_type_combo.currentIndexChanged.connect(self.on_array_type_combo)
|
||||||
|
|
||||||
self.drill_axis_radio.activated_custom.connect(self.on_linear_angle_radio)
|
self.drill_axis_radio.activated_custom.connect(self.on_linear_angle_radio)
|
||||||
|
|
||||||
self.app.ui.exc_add_array_drill_menuitem.triggered.connect(self.exc_add_drill_array)
|
|
||||||
self.app.ui.exc_add_drill_menuitem.triggered.connect(self.exc_add_drill)
|
|
||||||
|
|
||||||
self.app.ui.exc_resize_drill_menuitem.triggered.connect(self.exc_resize_drills)
|
self.app.ui.exc_resize_drill_menuitem.triggered.connect(self.exc_resize_drills)
|
||||||
self.app.ui.exc_copy_drill_menuitem.triggered.connect(self.exc_copy_drills)
|
self.app.ui.exc_copy_drill_menuitem.triggered.connect(self.exc_copy_drills)
|
||||||
@ -1663,7 +1665,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||||||
self.select_tool("select")
|
self.select_tool("select")
|
||||||
return
|
return
|
||||||
|
|
||||||
if isinstance(self.active_tool, FCDrillSelect):
|
if isinstance(self.active_tool, FCApertureSelect):
|
||||||
# self.app.log.debug("Replotting after click.")
|
# self.app.log.debug("Replotting after click.")
|
||||||
self.replot()
|
self.replot()
|
||||||
else:
|
else:
|
||||||
@ -1776,7 +1778,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||||||
if self.app.selection_type is not None:
|
if self.app.selection_type is not None:
|
||||||
self.draw_selection_area_handler(self.pos, pos, self.app.selection_type)
|
self.draw_selection_area_handler(self.pos, pos, self.app.selection_type)
|
||||||
self.app.selection_type = None
|
self.app.selection_type = None
|
||||||
elif isinstance(self.active_tool, FCDrillSelect):
|
elif isinstance(self.active_tool, FCApertureSelect):
|
||||||
# Dispatch event to active_tool
|
# Dispatch event to active_tool
|
||||||
# msg = self.active_tool.click(self.app.geo_editor.snap(event.xdata, event.ydata))
|
# msg = self.active_tool.click(self.app.geo_editor.snap(event.xdata, event.ydata))
|
||||||
# msg = self.active_tool.click_release((self.pos[0], self.pos[1]))
|
# msg = self.active_tool.click_release((self.pos[0], self.pos[1]))
|
||||||
|
@ -532,6 +532,10 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.geo_edit_toolbar.setObjectName('GeoEditor_TB')
|
self.geo_edit_toolbar.setObjectName('GeoEditor_TB')
|
||||||
self.addToolBar(self.geo_edit_toolbar)
|
self.addToolBar(self.geo_edit_toolbar)
|
||||||
|
|
||||||
|
self.grb_edit_toolbar = QtWidgets.QToolBar(_('Gerber Editor Toolbar'))
|
||||||
|
self.grb_edit_toolbar.setObjectName('GrbEditor_TB')
|
||||||
|
self.addToolBar(self.grb_edit_toolbar)
|
||||||
|
|
||||||
self.snap_toolbar = QtWidgets.QToolBar(_('Grid Toolbar'))
|
self.snap_toolbar = QtWidgets.QToolBar(_('Grid Toolbar'))
|
||||||
self.snap_toolbar.setObjectName('Snap_TB')
|
self.snap_toolbar.setObjectName('Snap_TB')
|
||||||
self.addToolBar(self.snap_toolbar)
|
self.addToolBar(self.snap_toolbar)
|
||||||
@ -640,6 +644,17 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.geo_edit_toolbar.addSeparator()
|
self.geo_edit_toolbar.addSeparator()
|
||||||
self.geo_move_btn = self.geo_edit_toolbar.addAction(QtGui.QIcon('share/move32.png'), _("Move Objects "))
|
self.geo_move_btn = self.geo_edit_toolbar.addAction(QtGui.QIcon('share/move32.png'), _("Move Objects "))
|
||||||
|
|
||||||
|
### Gerber Editor Toolbar ###
|
||||||
|
self.grb_select_btn = self.grb_edit_toolbar.addAction(QtGui.QIcon('share/pointer32.png'), _("Select"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Snap Toolbar ###
|
### Snap Toolbar ###
|
||||||
# Snap GRID toolbar is always active to facilitate usage of measurements done on GRID
|
# Snap GRID toolbar is always active to facilitate usage of measurements done on GRID
|
||||||
# self.addToolBar(self.snap_toolbar)
|
# self.addToolBar(self.snap_toolbar)
|
||||||
@ -1565,12 +1580,16 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.exc_edit_toolbar.setDisabled(True)
|
self.exc_edit_toolbar.setDisabled(True)
|
||||||
self.geo_edit_toolbar.setVisible(False)
|
self.geo_edit_toolbar.setVisible(False)
|
||||||
self.geo_edit_toolbar.setDisabled(True)
|
self.geo_edit_toolbar.setDisabled(True)
|
||||||
|
self.grb_edit_toolbar.setVisible(False)
|
||||||
|
self.grb_edit_toolbar.setDisabled(True)
|
||||||
|
|
||||||
self.corner_snap_btn.setVisible(False)
|
self.corner_snap_btn.setVisible(False)
|
||||||
self.snap_magnet.setVisible(False)
|
self.snap_magnet.setVisible(False)
|
||||||
elif layout == 'Compact':
|
elif layout == 'Compact':
|
||||||
self.exc_edit_toolbar.setDisabled(True)
|
self.exc_edit_toolbar.setDisabled(True)
|
||||||
self.geo_edit_toolbar.setDisabled(True)
|
self.geo_edit_toolbar.setDisabled(True)
|
||||||
|
self.grb_edit_toolbar.setDisabled(True)
|
||||||
|
|
||||||
self.snap_magnet.setVisible(True)
|
self.snap_magnet.setVisible(True)
|
||||||
self.corner_snap_btn.setVisible(True)
|
self.corner_snap_btn.setVisible(True)
|
||||||
self.snap_magnet.setDisabled(True)
|
self.snap_magnet.setDisabled(True)
|
||||||
@ -1580,6 +1599,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.exc_edit_toolbar.setDisabled(True)
|
self.exc_edit_toolbar.setDisabled(True)
|
||||||
self.geo_edit_toolbar.setVisible(False)
|
self.geo_edit_toolbar.setVisible(False)
|
||||||
self.geo_edit_toolbar.setDisabled(True)
|
self.geo_edit_toolbar.setDisabled(True)
|
||||||
|
self.grb_edit_toolbar.setVisible(False)
|
||||||
|
self.grb_edit_toolbar.setDisabled(True)
|
||||||
|
|
||||||
self.corner_snap_btn.setVisible(False)
|
self.corner_snap_btn.setVisible(False)
|
||||||
self.snap_magnet.setVisible(False)
|
self.snap_magnet.setVisible(False)
|
||||||
@ -1694,6 +1715,12 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.geo_edit_toolbar.addSeparator()
|
self.geo_edit_toolbar.addSeparator()
|
||||||
self.geo_move_btn = self.geo_edit_toolbar.addAction(QtGui.QIcon('share/move32.png'), _("Move Objects"))
|
self.geo_move_btn = self.geo_edit_toolbar.addAction(QtGui.QIcon('share/move32.png'), _("Move Objects"))
|
||||||
|
|
||||||
|
### Geometry Editor Toolbar ###
|
||||||
|
self.grb_select_btn = self.grb_edit_toolbar.addAction(QtGui.QIcon('share/pointer32.png'), _("Select"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Snap Toolbar ###
|
### Snap Toolbar ###
|
||||||
# Snap GRID toolbar is always active to facilitate usage of measurements done on GRID
|
# Snap GRID toolbar is always active to facilitate usage of measurements done on GRID
|
||||||
# self.addToolBar(self.snap_toolbar)
|
# self.addToolBar(self.snap_toolbar)
|
||||||
@ -1739,6 +1766,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.exc_edit_toolbar.setDisabled(True)
|
self.exc_edit_toolbar.setDisabled(True)
|
||||||
self.geo_edit_toolbar.setVisible(False)
|
self.geo_edit_toolbar.setVisible(False)
|
||||||
self.geo_edit_toolbar.setDisabled(True)
|
self.geo_edit_toolbar.setDisabled(True)
|
||||||
|
self.grb_edit_toolbar.setVisible(False)
|
||||||
|
self.grb_edit_toolbar.setDisabled(True)
|
||||||
|
|
||||||
self.corner_snap_btn.setVisible(False)
|
self.corner_snap_btn.setVisible(False)
|
||||||
self.snap_magnet.setVisible(False)
|
self.snap_magnet.setVisible(False)
|
||||||
@ -1747,6 +1776,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.exc_edit_toolbar.setDisabled(True)
|
self.exc_edit_toolbar.setDisabled(True)
|
||||||
self.geo_edit_toolbar.setVisible(True)
|
self.geo_edit_toolbar.setVisible(True)
|
||||||
self.geo_edit_toolbar.setDisabled(True)
|
self.geo_edit_toolbar.setDisabled(True)
|
||||||
|
self.grb_edit_toolbar.setVisible(False)
|
||||||
|
self.grb_edit_toolbar.setDisabled(True)
|
||||||
|
|
||||||
self.corner_snap_btn.setVisible(True)
|
self.corner_snap_btn.setVisible(True)
|
||||||
self.snap_magnet.setVisible(True)
|
self.snap_magnet.setVisible(True)
|
||||||
@ -3158,7 +3189,6 @@ class GeneralGUISetGroupUI(OptionsGroupUI):
|
|||||||
settings.remove(key)
|
settings.remove(key)
|
||||||
# This will write the setting to the platform specific storage.
|
# This will write the setting to the platform specific storage.
|
||||||
del settings
|
del settings
|
||||||
self.app.inform.emit(_("[success] GUI settings deleted ..."))
|
|
||||||
|
|
||||||
|
|
||||||
class GeneralAppPrefGroupUI(OptionsGroupUI):
|
class GeneralAppPrefGroupUI(OptionsGroupUI):
|
||||||
|
Loading…
Reference in New Issue
Block a user