- Milling Plugin - will update the UI form on object change with the data from its last tool
- Drilling Plugin - will update the UI form on object selection on canvas
This commit is contained in:
@@ -1311,6 +1311,12 @@ class ToolMilling(AppTool, Excellon):
|
||||
self.app.collection.set_active(self.obj_name)
|
||||
self.build_ui()
|
||||
|
||||
# new object that is now selected
|
||||
obj = self.app.collection.get_by_name(self.obj_name)
|
||||
if obj is not None:
|
||||
last_key = list(obj.tools.keys())[-1]
|
||||
self.to_form(storage=obj.tools[last_key]['data'])
|
||||
|
||||
def on_object_changed(self):
|
||||
if not self.app.ui.notebook.tabText(2) != _("Milling Tool"):
|
||||
return
|
||||
@@ -1342,6 +1348,10 @@ class ToolMilling(AppTool, Excellon):
|
||||
self.app.collection.set_active(self.obj_name)
|
||||
self.build_ui()
|
||||
|
||||
if self.target_obj is not None:
|
||||
last_key = list(self.target_obj.tools.keys())[-1]
|
||||
self.to_form(storage=self.target_obj.tools[last_key]['data'])
|
||||
|
||||
def on_object_selection_changed(self, current, previous):
|
||||
try:
|
||||
sel_obj = current.indexes()[0].internalPointer().obj
|
||||
|
||||
Reference in New Issue
Block a user