From ecba1a9232ac321ba7b047c7b926f14fdb27d534 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 6 Apr 2020 22:28:18 +0300 Subject: [PATCH] - updated the 2Sided Tool by not allowing the Gerber file to be mirrored without a valid reference and added some placeholder texts --- README.md | 1 + flatcamTools/ToolDblSided.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ee4f317..e115e7a8 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/flatcamTools/ToolDblSided.py b/flatcamTools/ToolDblSided.py index 89014940..29261cc5 100644 --- a/flatcamTools/ToolDblSided.py +++ b/flatcamTools/ToolDblSided.py @@ -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()