Commit 10f6ceea authored by sumpfralle's avatar sumpfralle

prevent accidental mixing up of different tool/process/bounds settings due to...

prevent accidental mixing up of different tool/process/bounds settings due to changes of a task setting


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@485 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 13363341
...@@ -386,11 +386,19 @@ class ProjectGui: ...@@ -386,11 +386,19 @@ class ProjectGui:
else: else:
return item_list[index] return item_list[index]
def set_current_item(table, item_list, item): def set_current_item(table, item_list, item):
old_index = self._treeview_get_active_index(table, item_list)
try: try:
new_index = item_list.index(item) new_index = item_list.index(item)
except ValueError: except ValueError:
return return
self._treeview_set_active_index(table, new_index) if old_index == new_index:
return
else:
self._treeview_set_active_index(table, new_index)
# update all controls related the (possibly changed) item
self.append_to_queue(self.switch_tool_table_selection)
self.append_to_queue(self.switch_process_table_selection)
self.append_to_queue(self.switch_tasklist_table_selection)
# the boundary manager # the boundary manager
self.settings.add_item("current_bounds", self.settings.add_item("current_bounds",
lambda: get_current_item(self.bounds_editor_table, self.bounds_list), lambda: get_current_item(self.bounds_editor_table, self.bounds_list),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment