Changeset 10876:7c16a44bff57 in orange


Ignore:
Timestamp:
05/17/12 19:53:19 (2 years ago)
Author:
mstajdohar
Branch:
default
rebase_source:
beab81d19a3fc473cf7dc84f695b92500eaee293
Message:

Bugs, bugs, bugs...

Location:
Orange/OrangeWidgets/Unsupervised
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Unsupervised/OWNxCanvasQt.py

    r10873 r10876  
    629629        current_nodes = self.networkCurve.nodes() 
    630630 
    631         center_x = numpy.average([node.x() for node in current_nodes.values()]) if len(current_nodes) > 0 else 0 
    632         center_y = numpy.average([node.y() for node in current_nodes.values()]) if len(current_nodes) > 0 else 0 
     631        center_x = numpy.average([node.x() for node in current_nodes.itervalues()]) if len(current_nodes) > 0 else 0 
     632        center_y = numpy.average([node.y() for node in current_nodes.itervalues()]) if len(current_nodes) > 0 else 0 
    633633 
    634634        def closest_nodes_with_pos(nodes): 
     
    650650        pos = dict((n, [numpy.average(c) for c in zip(*[(current_nodes[u].x(), current_nodes[u].y()) for u in closest_nodes_with_pos(set([n]))])]) for n in add_nodes) 
    651651 
    652         self.networkCurve.remove_nodes(list(remove_nodes)) 
     652        self.networkCurve.remove_nodes(remove_nodes) 
    653653 
    654654        nodes = dict((v, self.NodeItem(v, x=pos[v][0] if len(pos[v]) == 2 else center_x, y=pos[v][1] if len(pos[v]) == 2 else center_y, parent=self.networkCurve)) for v in add_nodes) 
  • Orange/OrangeWidgets/Unsupervised/OWNxExplorer.py

    r10862 r10876  
    766766        def set_graph_none(self): 
    767767            self.graph = None 
     768            self.graph_base = None 
    768769            #self.graph_base = None 
    769770            self._clear_combos() 
Note: See TracChangeset for help on using the changeset viewer.