Changeset 10861:5f70ff13ecc2 in orange


Ignore:
Timestamp:
05/07/12 14:58:23 (2 years ago)
Author:
mstajdohar
Branch:
default
Message:

Fixed some bugs on directed graph.

Location:
Orange
Files:
2 edited

Legend:

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

    r10852 r10861  
    822822                             and items[node]['y'].value != '?') 
    823823 
    824                 self.networkCanvas.networkCurve.set_node_coordinates(positions) 
     824                # ignore start position if all nodes are on the same coordinate 
     825                if len(set(positions.values())) > 1: 
     826                    self.networkCanvas.networkCurve.set_node_coordinates(positions) 
    825827 
    826828 
     
    11621164            qApp.processEvents() 
    11631165            self.networkCanvas.networkCurve.layout_fr(self.frSteps, False) 
    1164            # self.networkCanvas.update_canvas() 
    11651166            self.optButton.setChecked(False) 
    11661167            self.optButton.setText("Optimize layout") 
  • Orange/network/network.py

    r10852 r10861  
    5656import copy 
    5757import math 
     58import inspect 
     59 
    5860import numpy 
    5961import networkx as nx 
     
    191193 
    192194    def subgraph(self, nbunch): 
    193         G = nx.Graph.subgraph(self, nbunch) 
     195        G = self.__class__.__bases__[1].subgraph(self, nbunch) 
    194196        items = self.items().get_items(G.nodes()) 
    195197        G = G.to_orange_network() 
Note: See TracChangeset for help on using the changeset viewer.