[GRASS-SVN] r50036 - in grass/trunk: gui/wxpython/dbmgr
gui/wxpython/vdigit lib/vector/vedit
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 2 12:53:39 EST 2012
Author: martinl
Date: 2012-01-02 09:53:39 -0800 (Mon, 02 Jan 2012)
New Revision: 50036
Modified:
grass/trunk/gui/wxpython/dbmgr/manager.py
grass/trunk/gui/wxpython/vdigit/wxdisplay.py
grass/trunk/lib/vector/vedit/render.c
Log:
wxGUI/vdigit: fix highlighting selected features (areas enabled)
Modified: grass/trunk/gui/wxpython/dbmgr/manager.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/manager.py 2012-01-02 17:18:38 UTC (rev 50035)
+++ grass/trunk/gui/wxpython/dbmgr/manager.py 2012-01-02 17:53:39 UTC (rev 50036)
@@ -1305,9 +1305,9 @@
update = True)
if zoom:
- self.mapdisplay.Map.AdjustRegion() # adjust resolution
+ self.mapdisplay.Map.AdjustRegion() # adjust resolution
self.mapdisplay.Map.AlignExtentFromDisplay() # adjust extent
- self.mapdisplay.MapWindow.UpdateMap(render = True, renderVector = True)
+ self.mapdisplay.MapWindow.UpdateMap(render = True, renderVector = True)
else:
self.mapdisplay.MapWindow.UpdateMap(render = False, renderVector = True)
Modified: grass/trunk/gui/wxpython/vdigit/wxdisplay.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/wxdisplay.py 2012-01-02 17:18:38 UTC (rev 50035)
+++ grass/trunk/gui/wxpython/vdigit/wxdisplay.py 2012-01-02 17:53:39 UTC (rev 50036)
@@ -239,7 +239,7 @@
if not self.dc or not self.dcTmp:
return -1
- Debug.msg(3, "_drawObject(): type=%d npoints=%d", robj.type, robj.npoints)
+ Debug.msg(3, "_drawObject(): line=%d type=%d npoints=%d", robj.fid, robj.type, robj.npoints)
brush = None
if self._isSelected(robj.fid):
pdc = self.dcTmp
@@ -406,21 +406,8 @@
@return True if vector object is selected
@return False if vector object is not selected
"""
- if len(self.selected['cats']) < 1 or force:
- # select by id
- if line in self.selected['ids']:
- return True
- else:
- # select by cat
- Vect_read_line(self.poMapInfo, None, self.poCats, line)
- cats = self.poCats.contents
- for i in range(cats.n_cats):
- if cats.field[i] == self.selected['field'] and \
- cats.cat[i] in self.selected['cats']:
- # remember id
- # -> after drawing all features selected.cats is reseted */
- self.selected['ids'].append(line)
- return True
+ if line in self.selected['ids']:
+ return True
return False
@@ -462,13 +449,10 @@
if not self.poMapInfo or not self.dc or not self.dcTmp:
return -1
- try:
- rlist = Vedit_render_map(self.poMapInfo, byref(self._getRegionBox()), self._getDrawFlag(),
- self.region['center_easting'], self.region['center_northing'],
- self.mapObj.width, self.mapObj.height,
- max(self.region['nsres'], self.region['ewres'])).contents
- except SystemExit:
- pass
+ rlist = Vedit_render_map(self.poMapInfo, byref(self._getRegionBox()), self._getDrawFlag(),
+ self.region['center_easting'], self.region['center_northing'],
+ self.mapObj.width, self.mapObj.height,
+ max(self.region['nsres'], self.region['ewres'])).contents
self._resetTopology()
Modified: grass/trunk/lib/vector/vedit/render.c
===================================================================
--- grass/trunk/lib/vector/vedit/render.c 2012-01-02 17:18:38 UTC (rev 50035)
+++ grass/trunk/lib/vector/vedit/render.c 2012-01-02 17:53:39 UTC (rev 50036)
@@ -135,6 +135,9 @@
list_obj->nitems *
sizeof(struct robject *));
+ G_debug(1, "Vedit_render_map(): -> nitems = %d",
+ list_obj->nitems);
+
Vect_destroy_boxlist(list);
return list_obj;
More information about the grass-commit
mailing list