Changeset 4957:4eb1401c6bf5 in orange


Ignore:
Timestamp:
07/14/08 09:43:52 (6 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
a0623db33831f2e238e84d528d8514bb35eb96a6
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Prototypes/OWNetworkCanvas.py

    r4956 r4957  
    687687      self.discPalette.setNumberOfColors(len(colorIndices)) 
    688688       
    689       if self.visualizer.graph.items.domain[colorIndex].varType == orange.VarTypes.Continuous: 
     689      if colorIndex > -1 and self.visualizer.graph.items.domain[colorIndex].varType == orange.VarTypes.Continuous: 
    690690          minValue = float(min([x[colorIndex].value for x in self.visualizer.graph.items if x[colorIndex].value != "?"])) 
    691691          maxValue = float(max([x[colorIndex].value for x in self.visualizer.graph.items if x[colorIndex].value != "?"])) 
     
    711711                   
    712712          else: 
    713               self.networkCurve.setVertexColor(v, Qt.blue) 
     713              newColor = self.discPalette[0] 
     714              self.networkCurve.setVertexColor(v, newColor) 
    714715       
    715716      self.replot() 
Note: See TracChangeset for help on using the changeset viewer.