- minor issue in Paint Tool

This commit is contained in:
Marius Stanciu
2020-06-03 03:18:59 +03:00
committed by Marius
parent 86e36d3ca6
commit c5c11efeed
2 changed files with 7 additions and 6 deletions

View File

@@ -85,11 +85,11 @@ class ToolPaint(AppTool, Gerber):
) )
self.type_obj_combo_label.setMinimumWidth(60) self.type_obj_combo_label.setMinimumWidth(60)
self.type_obj_combo = RadioSet([{'label': "Geometry", 'value': 'geometry'}, self.type_obj_radio = RadioSet([{'label': "Geometry", 'value': 'geometry'},
{'label': "Gerber", 'value': 'gerber'}]) {'label': "Gerber", 'value': 'gerber'}])
grid0.addWidget(self.type_obj_combo_label, 1, 0) grid0.addWidget(self.type_obj_combo_label, 1, 0)
grid0.addWidget(self.type_obj_combo, 1, 1) grid0.addWidget(self.type_obj_radio, 1, 1)
# ################################################ # ################################################
# ##### The object to be painted ################# # ##### The object to be painted #################
@@ -657,7 +657,7 @@ class ToolPaint(AppTool, Gerber):
self.rest_cb.stateChanged.connect(self.on_rest_machining_check) self.rest_cb.stateChanged.connect(self.on_rest_machining_check)
self.reference_type_combo.currentIndexChanged.connect(self.on_reference_combo_changed) self.reference_type_combo.currentIndexChanged.connect(self.on_reference_combo_changed)
self.type_obj_combo.activated_custom.connect(self.on_type_obj_changed) self.type_obj_radio.activated_custom.connect(self.on_type_obj_changed)
self.apply_param_to_all.clicked.connect(self.on_apply_param_to_all_clicked) self.apply_param_to_all.clicked.connect(self.on_apply_param_to_all_clicked)
self.addtool_from_db_btn.clicked.connect(self.on_paint_tool_add_from_db_clicked) self.addtool_from_db_btn.clicked.connect(self.on_paint_tool_add_from_db_clicked)
@@ -690,7 +690,7 @@ class ToolPaint(AppTool, Gerber):
self.obj_combo.obj_type = {"gerber": "Gerber", "geometry": "Geometry"}[val] self.obj_combo.obj_type = {"gerber": "Gerber", "geometry": "Geometry"}[val]
idx = self.paintmethod_combo.findText(_("Laser_lines")) idx = self.paintmethod_combo.findText(_("Laser_lines"))
if self.type_obj_combo.get_value().lower() == 'gerber': if self.type_obj_radio.get_value().lower() == 'gerber':
self.paintmethod_combo.model().item(idx).setEnabled(True) self.paintmethod_combo.model().item(idx).setEnabled(True)
else: else:
self.paintmethod_combo.model().item(idx).setEnabled(False) self.paintmethod_combo.model().item(idx).setEnabled(False)
@@ -1047,7 +1047,7 @@ class ToolPaint(AppTool, Gerber):
self.on_tool_type(val=self.tool_type_radio.get_value()) self.on_tool_type(val=self.tool_type_radio.get_value())
# # make the default object type, "Geometry" # # make the default object type, "Geometry"
# self.type_obj_combo.set_value("geometry") # self.type_obj_radio.set_value("geometry")
# use the current selected object and make it visible in the Paint object combobox # use the current selected object and make it visible in the Paint object combobox
sel_list = self.app.collection.get_selected() sel_list = self.app.collection.get_selected()
@@ -1064,7 +1064,7 @@ class ToolPaint(AppTool, Gerber):
self.on_type_obj_changed(val=kind) self.on_type_obj_changed(val=kind)
self.on_reference_combo_changed() self.on_reference_combo_changed()
self.object_combo.set_value(active.options['name']) self.obj_combo.set_value(active.options['name'])
else: else:
kind = 'geometry' kind = 'geometry'
self.type_obj_radio.set_value('geometry') self.type_obj_radio.set_value('geometry')

View File

@@ -11,6 +11,7 @@ CHANGELOG for FlatCAM beta
- updated Transform Tool to have a selection of possible references for the transformations that are now selectable in the GUI - updated Transform Tool to have a selection of possible references for the transformations that are now selectable in the GUI
- Transform Tool - compacted the UI - Transform Tool - compacted the UI
- minor issue in Paint Tool
2.06.2020 2.06.2020