[Thuban-devel] Middle button pans

Frank Koormann frank.koormann at intevation.de
Thu Dec 16 10:10:29 CET 2004


Hi,

* Russell Nelson <nelson at crynwr.com> [041216 07:37]:
> Jan-Oliver Wagner writes:
>  > Any comments from others why this should not go into standard
>  > Thuban?

I like this feature also very much. However, it chrashes Thuban, if you
click the middle mouse button over a view without a session loaded.
 
| An unhandled exception occurred:
| 'NoneType' object has no attribute 'Hide'
| (please report to http://thuban.intevation.org/bugtracker.html)
| 
| Traceback (most recent call last):
|   File "/mobilehome/frank/projects/thuban/thuban-dev/Thuban/UI/view.py",
|   line 365, in OnMiddleUp
|     self.OnLeftUp(event)
|   File "/mobilehome/frank/projects/thuban/thuban-dev/Thuban/UI/view.py",
|   line 393, in OnLeftUp
|     self.tool.Hide(self.drag_dc)
| AttributeError: 'NoneType' object has no attribute 'Hide'

>  > > The next thing that I want is for the scroll wheel (button4 and button
>  > > 5) to zoom in and out.
> 
> That seems to be harder than I'd hoped.  There is a scrollwheel event,
> but there seems to be some problem with catching scrollwheel events in
> bitmaps, or something like that.

Works for me here on a Debian Sarge with:
Thuban 1.1 cvs-20041216
ChangeLog 2004-12-15

Currently using:
        wxPython 2.4.2.4
        Python 2.3.4
        PySQLite 0.5.1
        SQLite 2.8.15
        GDAL 1.2.1.0
        psycopg 1.1.15

Compiled for:
        GTK 1.2.10
        proj 4.4.8

Some snippets:

    EVT_MOUSEWHEEL(self, self.OnMouseWheel)

    def OnMouseWheel(self, event):
        print event
        print "wxMouseEvent::GetWheelRotation: %s" % event.GetWheelRotation()
        print "wxMouseEvent::GetWheelDelta   : %s" % event.GetWheelDelta()

<wxPython.events.wxMouseEventPtr instance; proxy of C++ wxMouseEvent
instance at _bfffeb30_wxMouseEvent_p>
wxMouseEvent::GetWheelRotation: -120
wxMouseEvent::GetWheelDelta   : 0
<wxPython.events.wxMouseEventPtr instance; proxy of C++ wxMouseEvent
instance at _bfffeb30_wxMouseEvent_p>
wxMouseEvent::GetWheelRotation: 120
wxMouseEvent::GetWheelDelta   : 0

Looking forward to see these features in Thuban!

-- 
Frank Koormann                             <frank.koormann at intevation.de>
 Professional Service around Free Software       (http://intevation.net/)
 FreeGIS Project                                 (http://freegis.org/)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20041216/8bef7fcd/attachment.bin


More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)