diff --git a/README.md b/README.md index 831dc61f..22ea0fbf 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ CAD program, and create G-Code for Isolation routing. 20.08.2019 -- added ability to do copper clearing through NCC Tool on Geometry objects also +- added ability to do copper clearing through NCC Tool on Geometry objects +- replaced the layout from Grid to Form for the Reference objects comboboxes in Paint Tool and in NCC Tool 19.08.2019 diff --git a/flatcamTools/ToolNonCopperClear.py b/flatcamTools/ToolNonCopperClear.py index 497f635b..3dfaef8a 100644 --- a/flatcamTools/ToolNonCopperClear.py +++ b/flatcamTools/ToolNonCopperClear.py @@ -321,8 +321,8 @@ class NonCopperClear(FlatCAMTool, Gerber): grid3.addWidget(self.reference_label, 9, 0) grid3.addWidget(self.reference_radio, 9, 1) - grid4 = QtWidgets.QGridLayout() - self.tools_box.addLayout(grid4) + form1 = QtWidgets.QFormLayout() + self.tools_box.addLayout(form1) self.box_combo_type_label = QtWidgets.QLabel('%s:' % _("Ref. Type")) self.box_combo_type_label.setToolTip( @@ -333,9 +333,7 @@ class NonCopperClear(FlatCAMTool, Gerber): self.box_combo_type.addItem(_("Gerber Reference Box Object")) self.box_combo_type.addItem(_("Excellon Reference Box Object")) self.box_combo_type.addItem(_("Geometry Reference Box Object")) - - grid4.addWidget(self.box_combo_type_label, 0, 0) - grid4.addWidget(self.box_combo_type, 0, 1) + form1.addRow(self.box_combo_type_label, self.box_combo_type) self.box_combo_label = QtWidgets.QLabel('%s:' % _("Ref. Object")) self.box_combo_label.setToolTip( @@ -345,8 +343,7 @@ class NonCopperClear(FlatCAMTool, Gerber): self.box_combo.setModel(self.app.collection) self.box_combo.setRootModelIndex(self.app.collection.index(0, 0, QtCore.QModelIndex())) self.box_combo.setCurrentIndex(1) - grid4.addWidget(self.box_combo_label, 1, 0) - grid4.addWidget(self.box_combo, 1, 1) + form1.addRow(self.box_combo_label, self.box_combo) self.box_combo.hide() self.box_combo_label.hide() diff --git a/flatcamTools/ToolPaint.py b/flatcamTools/ToolPaint.py index 6c6b7f60..9f557b9d 100644 --- a/flatcamTools/ToolPaint.py +++ b/flatcamTools/ToolPaint.py @@ -1,10 +1,10 @@ -# ########################################################## ## +# ########################################################## # FlatCAM: 2D Post-processing for Manufacturing # # http://flatcam.org # # File Modified: Marius Adrian Stanciu (c) # # Date: 3/10/2019 # # MIT Licence # -# ########################################################## ## +# ########################################################## from FlatCAMTool import FlatCAMTool from copy import copy, deepcopy @@ -262,8 +262,8 @@ class ToolPaint(FlatCAMTool, Gerber): ) grid3.addWidget(self.selectmethod_combo, 7, 1) - grid4 = QtWidgets.QGridLayout() - self.tools_box.addLayout(grid4) + form1 = QtWidgets.QFormLayout() + self.tools_box.addLayout(form1) self.box_combo_type_label = QtWidgets.QLabel('%s:' % _("Ref. Type")) self.box_combo_type_label.setToolTip( @@ -274,9 +274,8 @@ class ToolPaint(FlatCAMTool, Gerber): self.box_combo_type.addItem(_("Gerber Reference Box Object")) self.box_combo_type.addItem(_("Excellon Reference Box Object")) self.box_combo_type.addItem(_("Geometry Reference Box Object")) + form1.addRow(self.box_combo_type_label, self.box_combo_type) - grid4.addWidget(self.box_combo_type_label, 0, 0) - grid4.addWidget(self.box_combo_type, 0, 1) self.box_combo_label = QtWidgets.QLabel('%s:' % _("Ref. Object")) self.box_combo_label.setToolTip( @@ -286,8 +285,7 @@ class ToolPaint(FlatCAMTool, Gerber): self.box_combo.setModel(self.app.collection) self.box_combo.setRootModelIndex(self.app.collection.index(0, 0, QtCore.QModelIndex())) self.box_combo.setCurrentIndex(1) - grid4.addWidget(self.box_combo_label, 1, 0) - grid4.addWidget(self.box_combo, 1, 1) + form1.addRow(self.box_combo_label, self.box_combo) self.box_combo.hide() self.box_combo_label.hide() @@ -606,7 +604,7 @@ class ToolPaint(FlatCAMTool, Gerber): tool_dia = float(self.addtool_entry.get_value().replace(',', '.')) except ValueError: self.app.inform.emit(_("[ERROR_NOTCL] Wrong value format entered, " - "use a number.")) + "use a number.")) return if tool_dia is None: