- replaced the layout from Grid to Form for the Reference objects comboboxes in Paint Tool and in NCC Tool

This commit is contained in:
Marius Stanciu 2019-08-21 01:09:57 +03:00 committed by Marius
parent 03c264886d
commit 1d470bafb4
3 changed files with 13 additions and 17 deletions

View File

@ -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

View File

@ -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()

View File

@ -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: