diff --git a/fluents/navigator.py b/fluents/navigator.py index e6b5f49..9f670be 100644 --- a/fluents/navigator.py +++ b/fluents/navigator.py @@ -18,10 +18,10 @@ class NavigatorView (gtk.TreeView): gtk.TreeView.__init__(self) # various properties - self.set_enable_tree_lines(True) + + #self.set_enable_tree_lines(True) self.set_headers_visible(False) self.get_hadjustment().set_value(0) - self.set_enable_tree_lines(True) # Selection Mode self.get_selection().set_mode(gtk.SELECTION_MULTIPLE) @@ -58,7 +58,7 @@ class NavigatorView (gtk.TreeView): # sets data for drag event. - def slot_drag_data(self,treeview,context,selection,target_id,etime): + def slot_drag_data(self, treeview, context, selection, target_id, etime): treeselection = treeview.get_selection() model, paths = treeselection.get_selected_rows() if paths: @@ -183,7 +183,7 @@ class NavigatorView (gtk.TreeView): class NavigatorMenu(gtk.Menu): def __init__(self, navigator): gtk.Menu.__init__(self) - self.navigaotor = navigator + self.navigator = navigator self.dataset = None self.tree_iter = None @@ -277,9 +277,15 @@ class NavigatorMenu(gtk.Menu): plot = plots.ImagePlot(self.dataset, name='Image Plot') icon = fluents.icon_factory.get("line_plot") project.data_tree_insert(self.tree_iter, 'Image Plot', plot, None, "black", icon) + # fixme: image plot selections are not well defined + #plot.set_selection_listener(project.set_selection) + #project._selection_observers.append(plot) def on_plot_hist(self, item, navigator): project = navigator.project plot = plots.HistogramPlot(self.dataset, name='Histogram') icon = fluents.icon_factory.get("line_plot") project.data_tree_insert(self.tree_iter, 'Histogram', plot, None, "black", icon) + plot.set_selection_listener(project.set_selection) + project._selection_observers.append(plot) +