[GRASS-dev] grass7 wxgui zoom out not centred on mouse position
Markus Metz
markus.metz.giswork at googlemail.com
Sat Jan 17 12:22:59 EST 2009
In grass7 when zooming out the new display is not centred on the mouse
position, but on the mirror-position of the mouse position e.g. west is
not current[0] but current[0] - self.Map.width
I find this confusing, but maybe this is a matter of taste.
The Zoom function is in gui/wxpython/gui_modules/mapdisp_window.py
replacing lines 2231 - 2235 with
newreg['w'], newreg['n'] = self.Pixel2Cell((x1 -
self.Map.width * 0.75, \
y1 -
self.Map.height * 0.75))
newreg['e'], newreg['s'] = self.Pixel2Cell((x2 +
self.Map.width * 0.75, \
y2 +
self.Map.height * 0.75))
works for me, the zoomed out display is centred on the previous mouse
position with zoom factor 2 or the centre of the box drawn when using
the zoom out button.
Markus M
More information about the grass-dev
mailing list