- small fixes

This commit is contained in:
Marius Stanciu
2019-11-24 04:21:18 +02:00
committed by Marius
parent d03428f860
commit aac4fd75ca
4 changed files with 66 additions and 48 deletions

View File

@@ -127,7 +127,7 @@ class ToolCopperThieving(FlatCAMTool):
], orientation='vertical', stretch=False)
self.reference_label = QtWidgets.QLabel(_("Reference:"))
self.reference_label.setToolTip(
_("- 'Itself' - the copper thieving extent is based on the object that is copper cleared.\n "
_("- 'Itself' - the copper thieving extent is based on the object that is copper cleared.\n"
"- 'Area Selection' - left mouse click to start selection of the area to be filled.\n"
"- 'Reference Object' - will do copper thieving within the area specified by another object.")
)
@@ -171,7 +171,7 @@ class ToolCopperThieving(FlatCAMTool):
], stretch=False)
self.bbox_type_label = QtWidgets.QLabel(_("Box Type:"))
self.bbox_type_label.setToolTip(
_("- 'Rectangular' - the bounding box will be of rectangular shape.\n "
_("- 'Rectangular' - the bounding box will be of rectangular shape.\n"
"- 'Minimal' - the bounding box will be the convex hull shape.")
)
grid_lay.addWidget(self.bbox_type_label, 6, 0)
@@ -193,7 +193,7 @@ class ToolCopperThieving(FlatCAMTool):
], orientation='vertical', stretch=False)
self.fill_type_label = QtWidgets.QLabel(_("Fill Type:"))
self.fill_type_label.setToolTip(
_("- 'Solid' - copper thieving will be a solid polygon.\n "
_("- 'Solid' - copper thieving will be a solid polygon.\n"
"- 'Dots Grid' - the empty area will be filled with a pattern of dots.\n"
"- 'Squares Grid' - the empty area will be filled with a pattern of squares.\n"
"- 'Lines Grid' - the empty area will be filled with a pattern of lines.")
@@ -412,10 +412,11 @@ class ToolCopperThieving(FlatCAMTool):
self.geo_steps_per_circle = 128
# SIGNALS
self.fill_button.clicked.connect(self.execute)
self.box_combo_type.currentIndexChanged.connect(self.on_combo_box_type)
self.reference_radio.group_toggle_fn = self.on_toggle_reference
self.fill_type_radio.activated_custom.connect(self.on_thieving_type)
self.fill_button.clicked.connect(self.execute)
self.rb_button.clicked.connect(self.add_robber_bar)
def run(self, toggle=True):

View File

@@ -425,6 +425,8 @@ class ToolFiducials(FlatCAMTool):
self.sec_position = self.pos_radio.get_value()
fid_type = self.fid_type_radio.get_value()
self.click_points = list()
# get the Gerber object on which the Fiducial will be inserted
selection_index = self.grb_object_combo.currentIndex()
model_index = self.app.collection.index(selection_index, 0, self.grb_object_combo.rootModelIndex())
@@ -756,11 +758,14 @@ class ToolFiducials(FlatCAMTool):
elif len(self.click_points) == 3:
self.sec_points_coords_entry.set_value(self.click_points[2])
self.app.inform.emit('[success] %s' % _("Done. All fiducials have been added."))
self.add_fiducials_geo(self.click_points)
self.add_fiducials_geo(self.click_points, g_obj=self.grb_object, fid_type=fid_type)
self.grb_object.source_file = self.app.export_gerber(obj_name=self.grb_object.options['name'],
filename=None,
local_use=self.grb_object, use_thread=False)
self.on_exit()
else:
if len(self.click_points) == 2:
self.sec_points_coords_entry.set_value(self.click_points[2])
self.top_right_coords_entry.set_value(self.click_points[1])
self.app.inform.emit('[success] %s' % _("Done. All fiducials have been added."))
self.add_fiducials_geo(self.click_points, g_obj=self.grb_object, fid_type=fid_type)
self.grb_object.source_file = self.app.export_gerber(obj_name=self.grb_object.options['name'],