- Excellon Editor: fixed issue not remembering last tool after adding a new tool
- added custom mouse cursors for Excellon and Geometry Editors in some of their tools
This commit is contained in:
@@ -15,6 +15,8 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
- fixed version check
|
- fixed version check
|
||||||
- added custom mouse cursors for some tools in Gerber Editor
|
- added custom mouse cursors for some tools in Gerber Editor
|
||||||
- Gerber Editor: added multiple modes to lay a Region: 45-degrees, reverse 45-degrees, 90-degrees, reverse 90-degrees and free-angle. Added also key shortcuts 'T' and 'R' to cycle forward, respectively in reverse through the modes.
|
- Gerber Editor: added multiple modes to lay a Region: 45-degrees, reverse 45-degrees, 90-degrees, reverse 90-degrees and free-angle. Added also key shortcuts 'T' and 'R' to cycle forward, respectively in reverse through the modes.
|
||||||
|
- Excellon Editor: fixed issue not remembering last tool after adding a new tool
|
||||||
|
- added custom mouse cursors for Excellon and Geometry Editors in some of their tools
|
||||||
|
|
||||||
16.04.2019
|
16.04.2019
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,13 @@ class FCDrillAdd(FCShapeTool):
|
|||||||
self.draw_app.select_tool("select")
|
self.draw_app.select_tool("select")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero_drill.png'))
|
||||||
|
QtGui.QGuiApplication.setOverrideCursor(self.cursor)
|
||||||
|
|
||||||
geo = self.utility_geometry(data=(self.draw_app.snap_x, self.draw_app.snap_y))
|
geo = self.utility_geometry(data=(self.draw_app.snap_x, self.draw_app.snap_y))
|
||||||
|
|
||||||
if isinstance(geo, DrawToolShape) and geo.geo is not None:
|
if isinstance(geo, DrawToolShape) and geo.geo is not None:
|
||||||
@@ -82,6 +89,11 @@ class FCDrillAdd(FCShapeTool):
|
|||||||
|
|
||||||
def make(self):
|
def make(self):
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# add the point to drills if the diameter is a key in the dict, if not, create it add the drill location
|
# add the point to drills if the diameter is a key in the dict, if not, create it add the drill location
|
||||||
# to the value, as a list of itself
|
# to the value, as a list of itself
|
||||||
if self.selected_dia in self.draw_app.points_edit:
|
if self.selected_dia in self.draw_app.points_edit:
|
||||||
@@ -137,6 +149,13 @@ class FCDrillArray(FCShapeTool):
|
|||||||
self.draw_app.app.inform.emit(_("[WARNING_NOTCL] To add an Drill Array first select a tool in Tool Table"))
|
self.draw_app.app.inform.emit(_("[WARNING_NOTCL] To add an Drill Array first select a tool in Tool Table"))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero_drill_array.png'))
|
||||||
|
QtGui.QGuiApplication.setOverrideCursor(self.cursor)
|
||||||
|
|
||||||
geo = self.utility_geometry(data=(self.draw_app.snap_x, self.draw_app.snap_y), static=True)
|
geo = self.utility_geometry(data=(self.draw_app.snap_x, self.draw_app.snap_y), static=True)
|
||||||
|
|
||||||
if isinstance(geo, DrawToolShape) and geo.geo is not None:
|
if isinstance(geo, DrawToolShape) and geo.geo is not None:
|
||||||
@@ -252,6 +271,11 @@ class FCDrillArray(FCShapeTool):
|
|||||||
self.geometry = []
|
self.geometry = []
|
||||||
geo = None
|
geo = None
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# add the point to drills if the diameter is a key in the dict, if not, create it add the drill location
|
# add the point to drills if the diameter is a key in the dict, if not, create it add the drill location
|
||||||
# to the value, as a list of itself
|
# to the value, as a list of itself
|
||||||
if self.selected_dia not in self.draw_app.points_edit:
|
if self.selected_dia not in self.draw_app.points_edit:
|
||||||
@@ -537,6 +561,11 @@ class FCDrillSelect(DrawTool):
|
|||||||
DrawTool.__init__(self, exc_editor_app)
|
DrawTool.__init__(self, exc_editor_app)
|
||||||
self.name = 'drill_select'
|
self.name = 'drill_select'
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
self.exc_editor_app = exc_editor_app
|
self.exc_editor_app = exc_editor_app
|
||||||
self.storage = self.exc_editor_app.storage_dict
|
self.storage = self.exc_editor_app.storage_dict
|
||||||
# self.selected = self.exc_editor_app.selected
|
# self.selected = self.exc_editor_app.selected
|
||||||
@@ -1433,6 +1462,7 @@ class FlatCAMExcEditor(QtCore.QObject):
|
|||||||
for key in sorted(self.tool2tooldia):
|
for key in sorted(self.tool2tooldia):
|
||||||
if self.tool2tooldia[key] == tool_dia:
|
if self.tool2tooldia[key] == tool_dia:
|
||||||
row_to_be_selected = int(key) - 1
|
row_to_be_selected = int(key) - 1
|
||||||
|
self.last_tool_selected = int(key)
|
||||||
break
|
break
|
||||||
|
|
||||||
self.tools_table_exc.selectRow(row_to_be_selected)
|
self.tools_table_exc.selectRow(row_to_be_selected)
|
||||||
|
|||||||
@@ -1932,6 +1932,13 @@ class FCCircle(FCShapeTool):
|
|||||||
DrawTool.__init__(self, draw_app)
|
DrawTool.__init__(self, draw_app)
|
||||||
self.name = 'circle'
|
self.name = 'circle'
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero_circle.png'))
|
||||||
|
QtGui.QGuiApplication.setOverrideCursor(self.cursor)
|
||||||
|
|
||||||
self.start_msg = _("Click on CENTER ...")
|
self.start_msg = _("Click on CENTER ...")
|
||||||
self.steps_per_circ = self.draw_app.app.defaults["geometry_circle_steps"]
|
self.steps_per_circ = self.draw_app.app.defaults["geometry_circle_steps"]
|
||||||
|
|
||||||
@@ -1958,6 +1965,11 @@ class FCCircle(FCShapeTool):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def make(self):
|
def make(self):
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
p1 = self.points[0]
|
p1 = self.points[0]
|
||||||
p2 = self.points[1]
|
p2 = self.points[1]
|
||||||
radius = distance(p1, p2)
|
radius = distance(p1, p2)
|
||||||
@@ -2173,6 +2185,13 @@ class FCRectangle(FCShapeTool):
|
|||||||
DrawTool.__init__(self, draw_app)
|
DrawTool.__init__(self, draw_app)
|
||||||
self.name = 'rectangle'
|
self.name = 'rectangle'
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero.png'))
|
||||||
|
QtGui.QGuiApplication.setOverrideCursor(self.cursor)
|
||||||
|
|
||||||
self.start_msg = _("Click on 1st corner ...")
|
self.start_msg = _("Click on 1st corner ...")
|
||||||
|
|
||||||
def click(self, point):
|
def click(self, point):
|
||||||
@@ -2196,6 +2215,11 @@ class FCRectangle(FCShapeTool):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def make(self):
|
def make(self):
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
p1 = self.points[0]
|
p1 = self.points[0]
|
||||||
p2 = self.points[1]
|
p2 = self.points[1]
|
||||||
# self.geometry = LinearRing([p1, (p2[0], p1[1]), p2, (p1[0], p2[1])])
|
# self.geometry = LinearRing([p1, (p2[0], p1[1]), p2, (p1[0], p2[1])])
|
||||||
@@ -2213,6 +2237,13 @@ class FCPolygon(FCShapeTool):
|
|||||||
DrawTool.__init__(self, draw_app)
|
DrawTool.__init__(self, draw_app)
|
||||||
self.name = 'polygon'
|
self.name = 'polygon'
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero.png'))
|
||||||
|
QtGui.QGuiApplication.setOverrideCursor(self.cursor)
|
||||||
|
|
||||||
self.start_msg = _("Click on 1st point ...")
|
self.start_msg = _("Click on 1st point ...")
|
||||||
|
|
||||||
def click(self, point):
|
def click(self, point):
|
||||||
@@ -2239,6 +2270,11 @@ class FCPolygon(FCShapeTool):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def make(self):
|
def make(self):
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# self.geometry = LinearRing(self.points)
|
# self.geometry = LinearRing(self.points)
|
||||||
self.geometry = DrawToolShape(Polygon(self.points))
|
self.geometry = DrawToolShape(Polygon(self.points))
|
||||||
self.draw_app.in_action = False
|
self.draw_app.in_action = False
|
||||||
@@ -2260,11 +2296,25 @@ class FCPath(FCPolygon):
|
|||||||
"""
|
"""
|
||||||
Resulting type: LineString
|
Resulting type: LineString
|
||||||
"""
|
"""
|
||||||
|
def __init__(self, draw_app):
|
||||||
|
FCPolygon.__init__(self, draw_app)
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero_path.png'))
|
||||||
|
QtGui.QGuiApplication.setOverrideCursor(self.cursor)
|
||||||
|
|
||||||
def make(self):
|
def make(self):
|
||||||
self.geometry = DrawToolShape(LineString(self.points))
|
self.geometry = DrawToolShape(LineString(self.points))
|
||||||
self.name = 'path'
|
self.name = 'path'
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
self.draw_app.in_action = False
|
self.draw_app.in_action = False
|
||||||
self.complete = True
|
self.complete = True
|
||||||
self.draw_app.app.inform.emit(_("[success] Done. Path completed."))
|
self.draw_app.app.inform.emit(_("[success] Done. Path completed."))
|
||||||
@@ -2293,6 +2343,11 @@ class FCSelect(DrawTool):
|
|||||||
DrawTool.__init__(self, draw_app)
|
DrawTool.__init__(self, draw_app)
|
||||||
self.name = 'select'
|
self.name = 'select'
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
self.storage = self.draw_app.storage
|
self.storage = self.draw_app.storage
|
||||||
# self.shape_buffer = self.draw_app.shape_buffer
|
# self.shape_buffer = self.draw_app.shape_buffer
|
||||||
# self.selected = self.draw_app.selected
|
# self.selected = self.draw_app.selected
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 4.5 KiB |
BIN
share/aero_drill.png
Normal file
BIN
share/aero_drill.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
BIN
share/aero_drill_array.png
Normal file
BIN
share/aero_drill_array.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
Reference in New Issue
Block a user