bernhard: thuban/Thuban/UI mainwindow.py,1.138,1.139

cvs@intevation.de cvs at intevation.de
Thu Jan 20 19:47:29 CET 2005


Author: bernhard

Update of /thubanrepository/thuban/Thuban/UI
In directory doto:/tmp/cvs-serv795/Thuban/UI

Modified Files:
	mainwindow.py 
Log Message:
	* Thuban/UI/mainwindow.py(view_position_changed): Added docstring
	and comment that the warning code here is a hack.


Index: mainwindow.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/mainwindow.py,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- mainwindow.py	20 Jan 2005 17:55:23 -0000	1.138
+++ mainwindow.py	20 Jan 2005 18:47:26 -0000	1.139
@@ -335,11 +335,30 @@
         return self.dialogs.get(name)
 
     def view_position_changed(self):
+        """Put current position in status bar after a mouse move."""
         pos = self.canvas.CurrentPosition()
         if pos is not None:
             text = "(%10.10g, %10.10g)" % pos
         else:
             text = ""
+            # XXX This is a hack until we find a better place for this code.
+            # (BER 20050120)
+            # BH wrote (20050120):
+            # this branch is only executed when the mouse
+            # leaves the canvas window, so it's not that often [..]
+            # [Here] not the right place to put this code.  
+            # I don't have a better solution at hand, 
+            # but the view_position_changed is only there to update 
+            # the current position.  If other information is to
+            # be shown in the status bar it should 
+            # be handled in a different way and
+            # by other methods.
+            #
+            # The status bar widget supports some kind of stack of texts.
+            # maybe that can be used to distinguis 
+            # between short-lived information such as the mouse position 
+            # and more permanent information such as the hint 
+            # about the projections.
             map = self.canvas.Map()
             for layer in map.layers:
                 bbox = layer.LatLongBoundingBox()





More information about the Thuban-devel mailing list

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