[GRASS-SVN] r35812 - in grass/trunk/gui/wxpython: gui_modules vdigit
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Feb 8 11:00:17 EST 2009
Author: martinl
Date: 2009-02-08 11:00:17 -0500 (Sun, 08 Feb 2009)
New Revision: 35812
Modified:
grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py
grass/trunk/gui/wxpython/vdigit/pseudodc.i
Log:
wxGUI: add local PseudoDC.FindObjects()
Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py 2009-02-08 15:43:05 UTC (rev 35811)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py 2009-02-08 16:00:17 UTC (rev 35812)
@@ -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/trunk/gui/wxpython/vdigit/pseudodc.i
===================================================================
--- grass/trunk/gui/wxpython/vdigit/pseudodc.i 2009-02-08 15:43:05 UTC (rev 35811)
+++ grass/trunk/gui/wxpython/vdigit/pseudodc.i 2009-02-08 16:00:17 UTC (rev 35812)
@@ -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