Changeset 4041:a99dadf94bfe in orange


Ignore:
Timestamp:
08/03/07 18:44:19 (7 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
49af69a29aa98247b64b069a0cf7a05724ba0013
Message:

set zoom after labels on/off, tooltips on/off

Location:
orange/OrangeWidgets/Prototypes
Files:
2 edited

Legend:

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

    r4033 r4041  
    578578                    lbl = lbl[:-1] 
    579579                    self.tips.addToolTip(x1, y1, lbl) 
     580         
    580581        #print "done." 
    581582             
  • orange/OrangeWidgets/Prototypes/OWNetwork.py

    r4038 r4041  
    286286    def clickedAttLstBox(self): 
    287287        self.graph.setLabelText([self.attributes[i][0] for i in self.markerAttributes]) 
    288         self.updateCanvas() 
     288        #save current zoom 
     289        xmin = self.graph.axisScale(QwtPlot.xBottom).lBound() 
     290        xmax = self.graph.axisScale(QwtPlot.xBottom).hBound() 
     291        ymax = self.graph.axisScale(QwtPlot.yLeft).lBound() 
     292        ymin = self.graph.axisScale(QwtPlot.yLeft).hBound() 
     293        self.updateCanvas() 
     294        # set old zoom             
     295        self.graph.setNewZoom(self.graph.axisScale(QwtPlot.xBottom).lBound(), self.graph.axisScale(QwtPlot.xBottom).hBound(), self.graph.axisScale(QwtPlot.yLeft).lBound(), self.graph.axisScale(QwtPlot.yLeft).hBound(), xmin, xmax, ymax, ymin) 
     296         
    289297     
    290298         
    291299    def clickedTooltipLstBox(self): 
    292300        self.graph.setTooltipText([self.attributes[i][0] for i in self.tooltipAttributes]) 
    293         self.updateCanvas() 
     301        #save current zoom 
     302        xmin = self.graph.axisScale(QwtPlot.xBottom).lBound() 
     303        xmax = self.graph.axisScale(QwtPlot.xBottom).hBound() 
     304        ymax = self.graph.axisScale(QwtPlot.yLeft).lBound() 
     305        ymin = self.graph.axisScale(QwtPlot.yLeft).hBound() 
     306        self.updateCanvas() 
     307        # set old zoom             
     308        self.graph.setNewZoom(self.graph.axisScale(QwtPlot.xBottom).lBound(), self.graph.axisScale(QwtPlot.xBottom).hBound(), self.graph.axisScale(QwtPlot.yLeft).lBound(), self.graph.axisScale(QwtPlot.yLeft).hBound(), xmin, xmax, ymax, ymin) 
     309         
    294310     
    295311 
Note: See TracChangeset for help on using the changeset viewer.