Changeset 8429:df7dd5d04d1b in orange


Ignore:
Timestamp:
07/23/11 17:15:34 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
54e04cce7997ab5716a0d551033c304a53fa7c42
Message:

OWPlot.setShowAxisTitle now toggles the value by default

Location:
orange/OrangeWidgets/plot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/plot/owaxis.py

    r8426 r8429  
    121121 
    122122    def update(self, zoom_only = False): 
    123         if not self.graph_line or not self.title or not self.scene(): 
     123        if not self.graph_line or not self.scene(): 
     124            qDebug('OWAxis.update(): No line or scene') 
    124125            return 
    125126        self.line_item.setLine(self.graph_line) 
    126127        self.line_item.setPen(self.style.pen()) 
    127         self.title_item.setHtml(self.title) 
     128        if self.title: 
     129            self.title_item.setHtml(self.title) 
    128130        if self.title_location == AxisMiddle: 
    129131            title_p = 0.5 
  • orange/OrangeWidgets/plot/owplot.py

    r8428 r8429  
    296296             
    297297    def setShowAxisTitle(self, axis_id, b): 
     298        qDebug(('Showing' if b else 'Hiding') + ' axis title for ' + ('good' if axis_id in self.axes else 'bad') + ' axis ' + str(axis_id)) 
     299        qDebug(repr(b)) 
    298300        if axis_id in self.axes: 
     301            if b == -1: 
     302                b = not self.axes[axis_id].show_title 
    299303            self.axes[axis_id].set_show_title(b) 
     304            self.replot() 
    300305         
    301306    def set_axis_tick_length(self, axis_id, minor, medium, major): 
     
    549554            self.update() 
    550555            ## TODO: fitInView is very slow, but resetTransform doesn't seem to be doing its job 
    551             self.resetTransform() 
     556            # self.resetTransform() 
    552557            # self.fitInView(QRectF(self.contentsRect())) 
     558            self.setSceneRect(QRectF(self.contentsRect())) 
    553559             
    554560    def legend(self): 
Note: See TracChangeset for help on using the changeset viewer.