Changeset 8409:1904605540bf in orange


Ignore:
Timestamp:
07/21/11 12:20:27 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
cc6d1e8a171f95a2916865e2c60ebbd7cf835047
Message:

Slightly faster axis zooming in Scatterplot

File:
1 edited

Legend:

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

    r8408 r8409  
    269269         
    270270    def update_zoom(self): 
    271         qDebug('Updating zoom, graph line is ' + repr(self.graph_line)) 
    272271        if not self.graph_line: 
    273272            return 
     
    277276            step = 1 
    278277        v = self.graph_line.normalVector().unitVector() 
     278        rect = QRectF(self.graph_line.p1(), self.graph_line.p2()) 
     279        rect.adjust(-1, -1, 1, 1) 
    279280        for i in range(len(self._ticks)): 
    280281            pos, text, size = self._ticks[i] 
     
    287288            graph_pos = self.map_to_graph(pos) 
    288289            self.tick_items[i].setPos(graph_pos) 
    289             rect = QRectF(self.graph_line.p1(), self.graph_line.p2()) 
    290             rect.adjust(-1, -1, 1, 1) 
    291290            visible = rect.contains(graph_pos) 
    292291            self.tick_items[i].setVisible(visible) 
Note: See TracChangeset for help on using the changeset viewer.