- fixed a bug in Excellon Editor that crashed the app when editing the first tool added automatically into a new black Excellon file

- made sure that if the big mouse cursor is selected, the utility geometry in Excellon Editor has a thicker line width (2 pixels now) so it is visible over the geometry of the mouse cursor
This commit is contained in:
Marius Stanciu
2019-09-28 21:29:23 +03:00
committed by Marius
parent 161dbdcb2d
commit 32ff417a2c
7 changed files with 59 additions and 479 deletions

View File

@@ -2014,7 +2014,10 @@ class FlatCAMExcEditor(QtCore.QObject):
# VisPy Visuals
if self.app.is_legacy is False:
self.shapes = self.app.plotcanvas.new_shape_collection(layers=1)
self.tool_shape = self.app.plotcanvas.new_shape_collection(layers=1)
if self.app.plotcanvas.big_cursor is True:
self.tool_shape = self.app.plotcanvas.new_shape_collection(layers=1, line_width=2)
else:
self.tool_shape = self.app.plotcanvas.new_shape_collection(layers=1)
else:
from flatcamGUI.PlotCanvasLegacy import ShapeCollectionLegacy
self.shapes = ShapeCollectionLegacy(obj=self, app=self.app, name='shapes_exc_editor')
@@ -2977,7 +2980,7 @@ class FlatCAMExcEditor(QtCore.QObject):
# add a first tool in the Tool Table but only if the Excellon Object is empty
if not self.tool2tooldia:
self.on_tool_add(tooldia=float(self.app.defaults['excellon_editor_newdia']))
self.on_tool_add(tooldia=float('%.2f' % float(self.app.defaults['excellon_editor_newdia'])))
def update_fcexcellon(self, exc_obj):
"""

View File

@@ -4096,7 +4096,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
if specific_shape:
geo = specific_shape
else:
geo = self.active_tool.geometry
geo = deepcopy(self.active_tool.geometry)
if geo is None:
return