- modified the Paint, NCC and Isolation Tools that when no tools is selected in the Tools Table, a message will show that no Tool is selected and the Geometry generation button is disabled
This commit is contained in:
@@ -20,6 +20,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
- in Paint and NCC Tools made sure that using the key ESCAPE to cancel the tool will not create mouse events issues
|
- in Paint and NCC Tools made sure that using the key ESCAPE to cancel the tool will not create mouse events issues
|
||||||
- some updates in Tcl commands Paint and CopperClear data dicts
|
- some updates in Tcl commands Paint and CopperClear data dicts
|
||||||
- modified the Isolation Tool UI: now the tools can be reordered (if the order UI radio is set to 'no')
|
- modified the Isolation Tool UI: now the tools can be reordered (if the order UI radio is set to 'no')
|
||||||
|
- modified the Paint, NCC and Isolation Tools that when no tools is selected in the Tools Table, a message will show that no Tool is selected and the Geometry generation button is disabled
|
||||||
|
|
||||||
13.06.2020
|
13.06.2020
|
||||||
|
|
||||||
|
|||||||
@@ -657,11 +657,16 @@ class ToolIsolation(AppTool, Gerber):
|
|||||||
for it in table_items:
|
for it in table_items:
|
||||||
sel_rows.add(it.row())
|
sel_rows.add(it.row())
|
||||||
# sel_rows = sorted(set(index.row() for index in self.ui.tools_table.selectedIndexes()))
|
# sel_rows = sorted(set(index.row() for index in self.ui.tools_table.selectedIndexes()))
|
||||||
else:
|
|
||||||
sel_rows = [0]
|
|
||||||
|
|
||||||
if not sel_rows:
|
if not sel_rows or len(sel_rows) == 0:
|
||||||
|
self.ui.generate_iso_button.setDisabled(True)
|
||||||
|
self.ui.tool_data_label.setText(
|
||||||
|
"<b>%s: <font color='#0000FF'>%s</font></b>" % (_('Parameters for'), _("No Tool Selected"))
|
||||||
|
)
|
||||||
|
self.blockSignals(False)
|
||||||
return
|
return
|
||||||
|
else:
|
||||||
|
self.ui.generate_iso_button.setDisabled(False)
|
||||||
|
|
||||||
for current_row in sel_rows:
|
for current_row in sel_rows:
|
||||||
# populate the form with the data from the tool associated with the row parameter
|
# populate the form with the data from the tool associated with the row parameter
|
||||||
|
|||||||
@@ -278,11 +278,16 @@ class NonCopperClear(AppTool, Gerber):
|
|||||||
for it in table_items:
|
for it in table_items:
|
||||||
sel_rows.add(it.row())
|
sel_rows.add(it.row())
|
||||||
# sel_rows = sorted(set(index.row() for index in self.ui.tools_table.selectedIndexes()))
|
# sel_rows = sorted(set(index.row() for index in self.ui.tools_table.selectedIndexes()))
|
||||||
else:
|
|
||||||
sel_rows = [0]
|
|
||||||
|
|
||||||
if not sel_rows:
|
if not sel_rows or len(sel_rows) == 0:
|
||||||
|
self.ui.generate_ncc_button.setDisabled(True)
|
||||||
|
self.ui.tool_data_label.setText(
|
||||||
|
"<b>%s: <font color='#0000FF'>%s</font></b>" % (_('Parameters for'), _("No Tool Selected"))
|
||||||
|
)
|
||||||
|
self.blockSignals(False)
|
||||||
return
|
return
|
||||||
|
else:
|
||||||
|
self.ui.generate_ncc_button.setDisabled(False)
|
||||||
|
|
||||||
for current_row in sel_rows:
|
for current_row in sel_rows:
|
||||||
# populate the form with the data from the tool associated with the row parameter
|
# populate the form with the data from the tool associated with the row parameter
|
||||||
|
|||||||
@@ -262,11 +262,16 @@ class ToolPaint(AppTool, Gerber):
|
|||||||
for it in table_items:
|
for it in table_items:
|
||||||
sel_rows.add(it.row())
|
sel_rows.add(it.row())
|
||||||
# sel_rows = sorted(set(index.row() for index in self.ui.tools_table.selectedIndexes()))
|
# sel_rows = sorted(set(index.row() for index in self.ui.tools_table.selectedIndexes()))
|
||||||
else:
|
|
||||||
sel_rows = [0]
|
|
||||||
|
|
||||||
if not sel_rows:
|
if not sel_rows or len(sel_rows) == 0:
|
||||||
|
self.ui.generate_paint_button.setDisabled(True)
|
||||||
|
self.ui.tool_data_label.setText(
|
||||||
|
"<b>%s: <font color='#0000FF'>%s</font></b>" % (_('Parameters for'), _("No Tool Selected"))
|
||||||
|
)
|
||||||
|
self.blockSignals(False)
|
||||||
return
|
return
|
||||||
|
else:
|
||||||
|
self.ui.generate_paint_button.setDisabled(False)
|
||||||
|
|
||||||
for current_row in sel_rows:
|
for current_row in sel_rows:
|
||||||
# populate the form with the data from the tool associated with the row parameter
|
# populate the form with the data from the tool associated with the row parameter
|
||||||
@@ -3742,11 +3747,7 @@ class PaintUI:
|
|||||||
# GO Button
|
# GO Button
|
||||||
self.generate_paint_button = QtWidgets.QPushButton(_('Generate Geometry'))
|
self.generate_paint_button = QtWidgets.QPushButton(_('Generate Geometry'))
|
||||||
self.generate_paint_button.setToolTip(
|
self.generate_paint_button.setToolTip(
|
||||||
_("- 'Area Selection' - left mouse click to start selection of the area to be painted.\n"
|
_("Create a Geometry Object which paints the polygons.")
|
||||||
"Keeping a modifier key pressed (CTRL or SHIFT) will allow to add multiple areas.\n"
|
|
||||||
"- 'All Polygons' - the Paint will start after click.\n"
|
|
||||||
"- 'Reference Object' - will do non copper clearing within the area\n"
|
|
||||||
"specified by another object.")
|
|
||||||
)
|
)
|
||||||
self.generate_paint_button.setStyleSheet("""
|
self.generate_paint_button.setStyleSheet("""
|
||||||
QPushButton
|
QPushButton
|
||||||
|
|||||||
Reference in New Issue
Block a user