Changeset 4949:4b3a47a09edf in orange


Ignore:
Timestamp:
07/09/08 13:10:41 (6 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
9df8b4ea599e9bde84c27619f25c4ac8d4b02f3c
Message:

-removed the parent edge of root node

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/OWTreeViewer2D.py

    r4943 r4949  
    189189        self.parentEdge.setPen(QPen()) 
    190190        self.parentEdge.setZValue(self.zValue()-1) 
     191        if not parent: 
     192            self.parentEdge.hide() 
    191193        self.sceneObj+=[self.dropplet] 
    192194        self.selectionSquare=[] 
     
    253255    def show(self): 
    254256        GraphicsTextContainer.show(self) 
    255         self.parentEdge.show() 
     257        if self.parent: 
     258            self.parentEdge.show() 
    256259        if not self.nodeList: 
    257260            self.dropplet.hide() 
     
    806809                width = (n.tree.distribution.cases/self.tree.distribution.cases) * self.LineWidth 
    807810            elif self.LineWidthMethod == 2: 
    808                 width = (n.tree.distribution.cases/((n.parent!=self.scene and \ 
     811                width = (n.tree.distribution.cases/((n.parent and \ 
    809812                                    n.parent.tree.distribution.cases) or n.tree.distribution.cases)) * self.LineWidth 
    810813            n.setEdgeWidth(width) 
Note: See TracChangeset for help on using the changeset viewer.