Changeset 8198:22fc4be006bd in orange


Ignore:
Timestamp:
08/17/11 16:39:11 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
09e315db19ef798103e8196f2e7a3f7e35e7ebba
Message:

Recalculate zoom transform when resizing the window.

File:
1 edited

Legend:

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

    r8196 r8198  
    920920            self.set_graph_rect(self.graph_area) 
    921921            self._transform_cache = {} 
    922             self.map_transform = self.transform_for_axes() 
     922            if self._zoom_rect: 
     923                data_zoom_rect = self.map_transform.inverted()[0].mapRect(self._zoom_rect) 
     924                self.map_transform = self.transform_for_axes() 
     925                self.set_zoom_rect(self.map_transform.mapRect(data_zoom_rect)) 
     926            else: 
     927                self.map_transform = self.transform_for_axes() 
    923928         
    924929        for c in self.plot_items(): 
Note: See TracChangeset for help on using the changeset viewer.