Changeset 8616:8331530bc655 in orange


Ignore:
Timestamp:
08/05/11 12:34:42 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
4f0e9d30df05cd0bb659f753f4a66c3c316a61e4
Message:

Tooltips show up correctly while zooming

File:
1 edited

Legend:

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

    r8614 r8616  
    836836                self._current_ps_item.setPen(SelectionPen) 
    837837        else: 
    838             x, y = self.map_from_graph(point) 
     838            x, y = self.map_from_graph(point, zoom=True) 
    839839            text, x, y = self.tips.maybeTip(x, y) 
    840840            if type(text) == int:  
    841841                text = self.buildTooltip(text) 
    842842            if text and x is not None and y is not None: 
    843                 tp = self.mapFromScene(QPointF(x,y) * self.map_transform * self._zoom_transform) 
     843                tp = self.mapFromScene(QPointF(x,y) * self.map_transform * self.zoom_transform) 
    844844                self.showTip(tp.x(), tp.y(), text) 
    845845            else: 
     
    12491249         
    12501250    def zoom(self, point, scale): 
     1251        t, ok = self.zoom_transform.inverted() 
     1252        point = point * t 
    12511253        r = QRectF(self.zoom_rect) 
    12521254        i = 1.0/scale 
Note: See TracChangeset for help on using the changeset viewer.