Removed need to provide plots with project/workflow on creation, is instead injected by project itself when added to it.

This commit is contained in:
2006-04-24 14:42:45 +00:00
parent b807f27874
commit 6c72dec7fa
4 changed files with 23 additions and 23 deletions

View File

@@ -35,7 +35,7 @@ class Project:
"""Notifies observers"""
for observer in self._observers[key]:
if modifier != observer:
observer.update(self,key)
observer.update(key)
def set_selection(self,dim_name,selection):
"""Sets a current selection and notify observers"""
@@ -58,6 +58,8 @@ class Project:
elif isinstance(d, plots.Plot):
# self.add_view(d)
self.data_tree_insert(None, 'view', d)
d.set_project(self)
self.attach(d, 'selection_update')
def data_tree_insert(self, parent, text, data):
tree = self.data_tree