[GRASS-SVN] r35813 - in grass/branches/develbranch_6/gui/wxpython: gui_modules vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 8 11:01:43 EST 2009


Author: martinl
Date: 2009-02-08 11:01:43 -0500 (Sun, 08 Feb 2009)
New Revision: 35813

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
   grass/branches/develbranch_6/gui/wxpython/vdigit/pseudodc.i
Log:
wxGUI: add local PseudoDC.FindObjects()
       (merge from trunk, r35812)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py	2009-02-08 16:00:17 UTC (rev 35812)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py	2009-02-08 16:01:43 UTC (rev 35813)
@@ -1398,11 +1398,11 @@
             self.idlist = []
             self.dragid = ''
             self.lastpos = self.mouse['begin']
-            idlist = self.pdc.FindObjects(x=self.lastpos[0], y=self.lastpos[1],
-                                          radius=self.hitradius)
-                                          
-            if 99 in idlist: idlist.remove(99)                             
-            if idlist != [] :
+            idlist = self.pdc.FindObjects(self.lastpos[0], self.lastpos[1],
+                                          self.hitradius)
+            if 99 in idlist:
+                idlist.remove(99)                             
+            if idlist != []:
                 self.dragid = idlist[0] #drag whatever is on top
         else:
             pass

Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/pseudodc.i
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/pseudodc.i	2009-02-08 16:00:17 UTC (rev 35812)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/pseudodc.i	2009-02-08 16:01:43 UTC (rev 35813)
@@ -47,5 +47,9 @@
 		void TranslateId(int id, int dx, int dy) {
 		        self->TranslateId(id, (wxCoord) dx, (wxCoord) dy);
 		}
+		PyObject *FindObjects(int x, int y, int radius) {
+		        return self->FindObjects((wxCoord) x, (wxCoord) y,
+			                         (wxCoord) radius, *wxWHITE);
+                }
 	}
 };



More information about the grass-commit mailing list