[Thuban-commits] r2885 - in trunk/thuban: . Thuban Thuban/Model Thuban/UI
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Aug 18 15:35:32 CEST 2009
Author: dpinte
Date: 2009-08-18 15:35:30 +0200 (Tue, 18 Aug 2009)
New Revision: 2885
Modified:
trunk/thuban/ChangeLog
trunk/thuban/Thuban/Model/resource.py
trunk/thuban/Thuban/UI/view.py
trunk/thuban/Thuban/UI/viewport.py
trunk/thuban/Thuban/version.py
Log:
2009-08-18 Didrik Pinte <dpinte at dipole-consulting.com>
* NEWS : updated to 1.2.2 release
* Thuban/UI/view.py : improved mouse wheel zooming support
* Thuban/Model/resource.py : updated for latest GDAL support
* Thuban/UI/viewport.py : unconstrainted the scale bounds
* Thuban/version.py : updated to 1.2.2 (before setting it back to 1.2.svn)
Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog 2009-08-15 16:09:34 UTC (rev 2884)
+++ trunk/thuban/ChangeLog 2009-08-18 13:35:30 UTC (rev 2885)
@@ -1,3 +1,11 @@
+2009-08-18 Didrik Pinte <dpinte at dipole-consulting.com>
+
+ * NEWS : updated to 1.2.2 release
+ * Thuban/UI/view.py : improved mouse wheel zooming support
+ * Thuban/Model/resource.py : updated for latest GDAL support
+ * Thuban/UI/viewport.py : unconstrainted the scale bounds
+ * Thuban/version.py : updated to 1.2.2 (before setting it back to 1.2.svn)
+
2009-08-13 Didrik Pinte <dpinte at dipole-consulting.com>
* Thuban/UI/classgen.py : applying patch from Anthony Lenton solving a
Modified: trunk/thuban/Thuban/Model/resource.py
===================================================================
--- trunk/thuban/Thuban/Model/resource.py 2009-08-15 16:09:34 UTC (rev 2884)
+++ trunk/thuban/Thuban/Model/resource.py 2009-08-18 13:35:30 UTC (rev 2885)
@@ -38,8 +38,10 @@
#
# GDAL is supported if we can import both the thuban specific gdalwarp
# module and the GDAL python bindings.
-for _module in ("gdalwarp", "gdal"):
+osgeo_gdal_version = False
+for _module in ("gdalwarp", "osgeo.gdal"):
try:
+ print "importing %s" % _module
__import__(_module)
except ImportError, val:
gdal_support_status = (_("No GDAL support because module '%s'"
Modified: trunk/thuban/Thuban/UI/view.py
===================================================================
--- trunk/thuban/Thuban/UI/view.py 2009-08-15 16:09:34 UTC (rev 2884)
+++ trunk/thuban/Thuban/UI/view.py 2009-08-18 13:35:30 UTC (rev 2885)
@@ -428,7 +428,7 @@
if event.GetWheelRotation() > 0:
factor = 2
else: factor = 1.0/2.0
- self.ZoomFactor(factor)
+ self.ZoomFactor(factor, center=(event.m_x, event.m_y))
def OnSize(self, event):
# the window's size has changed. We have to get a new bitmap. If
Modified: trunk/thuban/Thuban/UI/viewport.py
===================================================================
--- trunk/thuban/Thuban/UI/viewport.py 2009-08-15 16:09:34 UTC (rev 2884)
+++ trunk/thuban/Thuban/UI/viewport.py 2009-08-18 13:35:30 UTC (rev 2885)
@@ -388,7 +388,7 @@
# into 16bit signed integers.
max_len = max(pwidth, pheight)
if max_len:
- max_scale = 32767.0 / max_len
+ max_scale = sys.maxint #.0 #/ max_len
else:
# FIXME: What to do in this case? The bbox is effectively
# empty so any scale should work.
@@ -402,7 +402,7 @@
if pheight:
scales.append(wheight / pheight)
if scales:
- min_scale = 0.1 * min(scales)
+ min_scale = 0.0001 * min(scales)
else:
min_scale = scale
Modified: trunk/thuban/Thuban/version.py
===================================================================
--- trunk/thuban/Thuban/version.py 2009-08-15 16:09:34 UTC (rev 2884)
+++ trunk/thuban/Thuban/version.py 2009-08-18 13:35:30 UTC (rev 2885)
@@ -41,7 +41,7 @@
#
thuban_branch = "1.2"
-thuban_release = "svn"
+thuban_release = "2"
More information about the Thuban-commits
mailing list