Changeset 8358:ce30bbed7f3d in orange


Ignore:
Timestamp:
07/05/11 17:12:33 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
0e5d663e1c14910c28d5eabed2e449968f35e0a9
Message:

Make sure both distrete and continuous ErrorBarCurves show up in OWDistributionsQt

Location:
orange/OrangeWidgets
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Graph/curve.py

    r8354 r8358  
    3131            self.setToolTip(tooltip) 
    3232        self._cached_rect = None 
    33  
    34     def __setattr__(self, name, value): 
    35         unisetattr(self, name, value, orangegraph.Curve) 
    36          
    37      
    38          
  • orange/OrangeWidgets/Graph/tools.py

    r8356 r8358  
    1212    n = len(lst) 
    1313    if n > size: 
    14         if parent and parent.scene(): 
    15             for i in lst[n:]: 
    16                 parent.scene().removeItem(i) 
     14        for i in lst[n:]: 
     15            i.setParentItem(None) 
    1716        return lst[:n] 
    1817    elif n < size: 
  • orange/OrangeWidgets/OWGraphQt.py

    r8356 r8358  
    535535            self.update_axes() 
    536536            self.update() 
    537            # self.fitInView(QRectF(self.contentsRect())) 
     537            ## TODO: fitInView is very slow, but resetTransform doesn't seem to be doing its job 
     538            self.resetTransform() 
     539            # self.fitInView(QRectF(self.contentsRect())) 
    538540             
    539541    def legend(self): 
  • orange/OrangeWidgets/Prototypes/OWDistributionsQt.py

    r8355 r8358  
    2929    def updateProperties(self): 
    3030        if self.style() != Curve.UserCurve: 
    31             resize_plot_item_list(self._items, 0, None, self.scene()) 
     31            resize_plot_item_list(self._items, 0, None, self) 
    3232            self.items = [] 
     33            self.setDirty() 
    3334            Curve.updateProperties(self) 
    3435            return 
     
    8889        curve = distribErrorBarCurve('') 
    8990        curve.setVisible(visible) 
    90         curve.setXAxis(xAxis) 
    91         curve.setYAxis(yAxis) 
    92         OWGraph.add_custom_curve(self, curve, enableLegend=0) 
    93         return curve 
    94  
     91        curve.setAxes(xAxis, yAxis) 
     92        return OWGraph.add_custom_curve(self, curve, enableLegend=0) 
    9593 
    9694    def sizeHint(self): 
     
    387385            self.enableYRaxis(0) 
    388386            self.setShowYRaxisTitle(0) 
     387         
    389388 
    390389        def enableIfExists(curve, en): 
Note: See TracChangeset for help on using the changeset viewer.