- updated the 2Sided Tool by not allowing the Gerber file to be mirrored without a valid reference and added some placeholder texts

This commit is contained in:
Marius Stanciu 2020-04-06 22:28:18 +03:00 committed by Marius
parent e1269cdb34
commit ecba1a9232
2 changed files with 6 additions and 3 deletions

View File

@ -17,6 +17,7 @@ CAD program, and create G-Code for Isolation routing.
- fixed a bug in handling the UP/DOWN key shortcuts that caused a crash when no object was selected in the Project Tab; also made sure that the said keys are handled only for the Project Tab
- some PEP8 changes and other minor changes
- updated the requirements file
- updated the 2Sided Tool by not allowing the Gerber file to be mirrored without a valid reference and added some placeholder texts
5.04.2020

View File

@ -187,6 +187,7 @@ class DblSidedTool(FlatCAMTool):
# ## Point/Box
self.point_entry = EvalEntry()
self.point_entry.setPlaceholderText(_("Point coordinates"))
# Add a reference
self.add_point_button = QtWidgets.QPushButton(_("Add"))
@ -416,6 +417,7 @@ class DblSidedTool(FlatCAMTool):
)
self.alignment_holes = EvalEntry()
self.alignment_holes.setPlaceholderText(_("Drill coordinates"))
grid_lay4.addWidget(self.ah_label, 0, 0, 1, 2)
grid_lay4.addWidget(self.alignment_holes, 1, 0, 1, 2)
@ -667,9 +669,9 @@ class DblSidedTool(FlatCAMTool):
try:
px, py = self.point_entry.get_value()
except TypeError:
self.app.inform.emit('[WARNING_NOTCL] %s' % _("'Point' coordinates missing. "
"Using Origin (0, 0) as mirroring reference."))
px, py = (0, 0)
self.app.inform.emit('[WARNING_NOTCL] %s' % _("There are no Point coordinates in the Point field. "
"Add coords and try again ..."))
return
else:
selection_index_box = self.box_combo.currentIndex()