- added custom mouse cursors for some tools in Gerber Editor
This commit is contained in:
@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
|
|
||||||
- Gerber Editor: added some messages to warn user if no selection exists when trying to do aperture deletion or aperture geometry deletion
|
- Gerber Editor: added some messages to warn user if no selection exists when trying to do aperture deletion or aperture geometry deletion
|
||||||
- fixed version check
|
- fixed version check
|
||||||
|
- added custom mouse cursors for some tools in Gerber Editor
|
||||||
|
|
||||||
16.04.2019
|
16.04.2019
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,13 @@ class FCPad(FCShapeTool):
|
|||||||
self.name = 'pad'
|
self.name = 'pad'
|
||||||
self.draw_app = draw_app
|
self.draw_app = draw_app
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero_circle.png'))
|
||||||
|
QtGui.QGuiApplication.setOverrideCursor(self.cursor)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.radius = float(self.draw_app.storage_dict[self.draw_app.last_aperture_selected]['size']) / 2
|
self.radius = float(self.draw_app.storage_dict[self.draw_app.last_aperture_selected]['size']) / 2
|
||||||
except KeyError:
|
except KeyError:
|
||||||
@@ -226,6 +233,13 @@ class FCPadArray(FCShapeTool):
|
|||||||
else:
|
else:
|
||||||
self.dont_execute = False
|
self.dont_execute = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero_array.png'))
|
||||||
|
QtGui.QGuiApplication.setOverrideCursor(self.cursor)
|
||||||
|
|
||||||
self.storage_obj = self.draw_app.storage_dict[self.draw_app.last_aperture_selected]['solid_geometry']
|
self.storage_obj = self.draw_app.storage_dict[self.draw_app.last_aperture_selected]['solid_geometry']
|
||||||
self.steps_per_circ = self.draw_app.app.defaults["geometry_circle_steps"]
|
self.steps_per_circ = self.draw_app.app.defaults["geometry_circle_steps"]
|
||||||
|
|
||||||
@@ -593,7 +607,18 @@ class FCRegion(FCShapeTool):
|
|||||||
|
|
||||||
self.gridx_size = float(self.draw_app.app.ui.grid_gap_x_entry.get_value())
|
self.gridx_size = float(self.draw_app.app.ui.grid_gap_x_entry.get_value())
|
||||||
self.gridy_size = float(self.draw_app.app.ui.grid_gap_y_entry.get_value())
|
self.gridy_size = float(self.draw_app.app.ui.grid_gap_y_entry.get_value())
|
||||||
|
|
||||||
self.temp_points = []
|
self.temp_points = []
|
||||||
|
# this will store the inflexion point in the geometry
|
||||||
|
self.inter_point = None
|
||||||
|
|
||||||
|
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 ...")
|
||||||
|
|
||||||
@@ -612,16 +637,18 @@ class FCRegion(FCShapeTool):
|
|||||||
self.gridy_size = float(self.draw_app.app.ui.grid_gap_y_entry.get_value())
|
self.gridy_size = float(self.draw_app.app.ui.grid_gap_y_entry.get_value())
|
||||||
|
|
||||||
def utility_geometry(self, data=None):
|
def utility_geometry(self, data=None):
|
||||||
|
if len(self.points) == 0:
|
||||||
|
return DrawToolUtilityShape(Point(data).buffer(self.buf_val))
|
||||||
|
|
||||||
if len(self.points) == 1:
|
if len(self.points) == 1:
|
||||||
temp_points = [x for x in self.points]
|
self.temp_points = [x for x in self.points]
|
||||||
temp_points.append(data)
|
self.temp_points.append(data)
|
||||||
return DrawToolUtilityShape(LineString(temp_points).buffer(self.buf_val, join_style=1))
|
return DrawToolUtilityShape(LineString(self.temp_points).buffer(self.buf_val, join_style=1))
|
||||||
|
|
||||||
if len(self.points) > 1:
|
if len(self.points) > 1:
|
||||||
temp_points = [x for x in self.points]
|
self.temp_points = [x for x in self.points]
|
||||||
temp_points.append(data)
|
self.temp_points.append(data)
|
||||||
return DrawToolUtilityShape(LinearRing(temp_points).buffer(self.buf_val, join_style=1))
|
return DrawToolUtilityShape(LinearRing(self.temp_points).buffer(self.buf_val, join_style=1))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def make(self):
|
def make(self):
|
||||||
@@ -657,6 +684,14 @@ class FCTrack(FCRegion):
|
|||||||
self.name = 'track'
|
self.name = 'track'
|
||||||
|
|
||||||
self.draw_app = draw_app
|
self.draw_app = draw_app
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero_path.png'))
|
||||||
|
QtGui.QGuiApplication.setOverrideCursor(self.cursor)
|
||||||
|
|
||||||
self.draw_app.app.inform.emit(_('Track Mode 1: 45 degrees ...'))
|
self.draw_app.app.inform.emit(_('Track Mode 1: 45 degrees ...'))
|
||||||
self.mode = 1
|
self.mode = 1
|
||||||
|
|
||||||
@@ -1042,6 +1077,11 @@ class FCApertureSelect(DrawTool):
|
|||||||
self.grb_editor_app.hide_tool('all')
|
self.grb_editor_app.hide_tool('all')
|
||||||
self.grb_editor_app.hide_tool('select')
|
self.grb_editor_app.hide_tool('select')
|
||||||
|
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
def set_origin(self, origin):
|
def set_origin(self, origin):
|
||||||
self.origin = origin
|
self.origin = origin
|
||||||
|
|
||||||
@@ -2660,8 +2700,14 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||||||
self.app.panning_action = False
|
self.app.panning_action = False
|
||||||
else:
|
else:
|
||||||
if self.in_action is False:
|
if self.in_action is False:
|
||||||
|
try:
|
||||||
|
QtGui.QGuiApplication.restoreOverrideCursor()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
if self.active_tool.complete is False and not isinstance(self.active_tool, FCApertureSelect):
|
if self.active_tool.complete is False and not isinstance(self.active_tool, FCApertureSelect):
|
||||||
self.active_tool.complete = True
|
self.active_tool.complete = True
|
||||||
|
self.in_action = False
|
||||||
self.delete_utility_geometry()
|
self.delete_utility_geometry()
|
||||||
self.select_tool('select')
|
self.select_tool('select')
|
||||||
else:
|
else:
|
||||||
|
|||||||
BIN
share/aero.png
Normal file
BIN
share/aero.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
share/aero_array.png
Normal file
BIN
share/aero_array.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
share/aero_buffer.png
Normal file
BIN
share/aero_buffer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
share/aero_circle.png
Normal file
BIN
share/aero_circle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
BIN
share/aero_path.png
Normal file
BIN
share/aero_path.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Reference in New Issue
Block a user