- added a new parameter in the Tool Film which control the thickness of the stroke width in the resulting SVG. It's a scale parameter.

- whatever was the visibility of the corresponding toolbar when we enter in the Editor, it will be set after exit from the Editor (either Geometry Editor or Excellon Editor).
- added ability to be detached for the tabs in the Notebook section (Project, Selected and Tool)
- added ability for all detachable tabs to be restored to the same position from where they were detached.
- restored the way the tools autoloaded the objects in the comboboxes
This commit is contained in:
Marius Stanciu
2019-02-04 20:49:37 +02:00
committed by Marius S
parent 166fa0470b
commit 713b584841
11 changed files with 129 additions and 50 deletions

View File

@@ -1970,6 +1970,9 @@ class FlatCAMGeoEditor(QtCore.QObject):
self.move_timer = QtCore.QTimer()
self.move_timer.setSingleShot(True)
# this var will store the state of the toolbar before starting the editor
self.toolbar_old_state = False
self.key = None # Currently pressed key
self.geo_key_modifiers = None
self.x = None # Current mouse cursor pos
@@ -2083,24 +2086,29 @@ class FlatCAMGeoEditor(QtCore.QObject):
if settings.contains("theme"):
theme = settings.value('theme', type=str)
if theme == 'standard':
self.app.ui.geo_edit_toolbar.setVisible(False)
# 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 theme == 'compact':
self.app.ui.snap_max_dist_entry.setEnabled(False)
# self.app.ui.geo_edit_toolbar.setVisible(True)
self.app.ui.snap_max_dist_entry.setEnabled(False)
self.app.ui.corner_snap_btn.setEnabled(False)
else:
self.app.ui.geo_edit_toolbar.setVisible(False)
# self.app.ui.geo_edit_toolbar.setVisible(False)
self.app.ui.snap_magnet.setVisible(False)
self.app.ui.corner_snap_btn.setVisible(False)
self.app.ui.snap_max_dist_entry.setEnabled(False)
self.app.ui.corner_snap_btn.setEnabled(False)
# set the Editor Toolbar visibility to what was before entering in the Editor
self.app.ui.geo_edit_toolbar.setVisible(False) if self.toolbar_old_state is False \
else self.app.ui.geo_edit_toolbar.setVisible(True)
# Disable visuals
self.shapes.enabled = False
self.tool_shape.enabled = False
@@ -3695,6 +3703,9 @@ class FlatCAMExcEditor(QtCore.QObject):
# this will flag if the Editor "tools" are launched from key shortcuts (True) or from menu toolbar (False)
self.launched_from_shortcuts = False
# this var will store the state of the toolbar before starting the editor
self.toolbar_old_state = False
self.app.ui.delete_drill_btn.triggered.connect(self.on_delete_btn)
self.name_entry.returnPressed.connect(self.on_name_activate)
self.addtool_btn.clicked.connect(self.on_tool_add)
@@ -4216,27 +4227,31 @@ class FlatCAMExcEditor(QtCore.QObject):
if settings.contains("theme"):
theme = settings.value('theme', type=str)
if theme == 'standard':
self.app.ui.exc_edit_toolbar.setVisible(False)
# self.app.ui.exc_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 theme == 'compact':
self.app.ui.exc_edit_toolbar.setVisible(True)
# self.app.ui.exc_edit_toolbar.setVisible(True)
self.app.ui.snap_max_dist_entry.setEnabled(False)
self.app.ui.corner_snap_btn.setEnabled(False)
self.app.ui.snap_magnet.setVisible(True)
self.app.ui.corner_snap_btn.setVisible(True)
else:
self.app.ui.exc_edit_toolbar.setVisible(False)
# self.app.ui.exc_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)
# set the Editor Toolbar visibility to what was before entering in the Editor
self.app.ui.exc_edit_toolbar.setVisible(False) if self.toolbar_old_state is False \
else self.app.ui.exc_edit_toolbar.setVisible(True)
# Disable visuals
self.shapes.enabled = False
self.tool_shape.enabled = False