- in Gerber Editor - for Disc and SemiDisc tools now it is allowed to start without a defined aperture; it will be assumed that we work with an aperture with size zero

This commit is contained in:
Marius Stanciu
2020-12-03 15:41:12 +02:00
parent ebdcbcb1bf
commit 9fb7dbe0c5
2 changed files with 26 additions and 23 deletions

View File

@@ -11,6 +11,7 @@ CHANGELOG for FlatCAM beta
- in Gerber Editor - modified the UI - in Gerber Editor - modified the UI
- in Gerber Editor - added new parameters for selected polygons: is_valid and area - in Gerber Editor - added new parameters for selected polygons: is_valid and area
- in Gerber Editor - for Disc and SemiDisc tools now it is allowed to start without a defined aperture; it will be assumed that we work with an aperture with size zero
2.12.2020 2.12.2020

View File

@@ -1638,17 +1638,18 @@ class DiscEditorGrb(ShapeToolEditorGrb):
try: try:
size_ap = float(self.draw_app.storage_dict[self.draw_app.last_aperture_selected]['size']) size_ap = float(self.draw_app.storage_dict[self.draw_app.last_aperture_selected]['size'])
except KeyError: except KeyError:
self.draw_app.app.inform.emit('[ERROR_NOTCL] %s' % size_ap = 0.0
_("You need to preselect a aperture in the Aperture Table that has a size.")) # self.draw_app.app.inform.emit('[ERROR_NOTCL] %s' %
try: # _("You need to preselect a aperture in the Aperture Table that has a size."))
QtGui.QGuiApplication.restoreOverrideCursor() # try:
except Exception: # QtGui.QGuiApplication.restoreOverrideCursor()
pass # except Exception:
self.dont_execute = True # pass
self.draw_app.in_action = False # self.dont_execute = True
self.complete = True # self.draw_app.in_action = False
self.draw_app.select_tool('select') # self.complete = True
return # self.draw_app.select_tool('select')
# return
self.buf_val = (size_ap / 2) if size_ap > 0 else 0.0000001 self.buf_val = (size_ap / 2) if size_ap > 0 else 0.0000001
@@ -1761,17 +1762,18 @@ class DiscSemiEditorGrb(ShapeToolEditorGrb):
try: try:
size_ap = float(self.draw_app.storage_dict[self.draw_app.last_aperture_selected]['size']) size_ap = float(self.draw_app.storage_dict[self.draw_app.last_aperture_selected]['size'])
except KeyError: except KeyError:
self.draw_app.app.inform.emit('[ERROR_NOTCL] %s' % size_ap = 0.0
_("You need to preselect a aperture in the Aperture Table that has a size.")) # self.draw_app.app.inform.emit('[ERROR_NOTCL] %s' %
try: # _("You need to preselect a aperture in the Aperture Table that has a size."))
QtGui.QGuiApplication.restoreOverrideCursor() # try:
except Exception: # QtGui.QGuiApplication.restoreOverrideCursor()
pass # except Exception:
self.dont_execute = True # pass
self.draw_app.in_action = False # self.dont_execute = True
self.complete = True # self.draw_app.in_action = False
self.draw_app.select_tool('select') # self.complete = True
return # self.draw_app.select_tool('select')
# return
self.buf_val = (size_ap / 2) if size_ap > 0 else 0.0000001 self.buf_val = (size_ap / 2) if size_ap > 0 else 0.0000001
@@ -4373,7 +4375,7 @@ class AppGerberEditor(QtCore.QObject):
self.app.log.debug("on_tool_select('%s')" % tool) self.app.log.debug("on_tool_select('%s')" % tool)
if self.last_aperture_selected is None and current_tool != 'select': if self.last_aperture_selected is None and current_tool not in ['select', 'disc', 'semidisc']:
# self.draw_app.select_tool('select') # self.draw_app.select_tool('select')
self.complete = True self.complete = True
current_tool = 'select' current_tool = 'select'