- in Cutout, 2Sided, Film, NCC, Paint, Panelize and Subtract Tool made sure that the object selection in Project Tab reflects in the selected object in the Tools
- set the shortcut key for Milling Tool to ALt+M and for Corner Markers Tool to Alt+B
This commit is contained in:
committed by
Marius Stanciu
parent
89ce3b32f0
commit
e677a6592e
@@ -183,6 +183,8 @@ class ToolPaint(AppTool, Gerber):
|
||||
self.ui.add_newtool_button.clicked.connect(lambda: self.on_tool_add())
|
||||
self.ui.addtool_from_db_btn.clicked.connect(self.on_paint_tool_add_from_db_clicked)
|
||||
|
||||
self.app.proj_selection_changed.connect(self.on_object_selection_changed)
|
||||
|
||||
self.ui.reset_button.clicked.connect(self.set_tool_ui)
|
||||
|
||||
# Cleanup on Graceful exit (CTRL+ALT+X combo key)
|
||||
@@ -281,6 +283,18 @@ class ToolPaint(AppTool, Gerber):
|
||||
if len(sel_rows) == 1:
|
||||
self.update_ui()
|
||||
|
||||
def on_object_selection_changed(self, current, previous):
|
||||
try:
|
||||
name = current.indexes()[0].internalPointer().obj.options['name']
|
||||
kind = current.indexes()[0].internalPointer().obj.kind
|
||||
|
||||
if kind in ['gerber', 'geometry']:
|
||||
self.ui.type_obj_radio.set_value(kind)
|
||||
|
||||
self.ui.obj_combo.set_value(name)
|
||||
except IndexError:
|
||||
pass
|
||||
|
||||
def update_ui(self):
|
||||
self.blockSignals(True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user