[GRASS-SVN] r50037 - in grass/branches/develbranch_6:
gui/wxpython/dbmgr gui/wxpython/vdigit lib/vector/vedit
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 2 13:04:34 EST 2012
Author: martinl
Date: 2012-01-02 10:04:34 -0800 (Mon, 02 Jan 2012)
New Revision: 50037
Modified:
grass/branches/develbranch_6/gui/wxpython/dbmgr/manager.py
grass/branches/develbranch_6/gui/wxpython/vdigit/wxdisplay.py
grass/branches/develbranch_6/lib/vector/vedit/render.c
Log:
wxGUI/vdigit: fix highlighting selected features (areas enabled)
(merge r50036 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/dbmgr/manager.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/dbmgr/manager.py 2012-01-02 17:53:39 UTC (rev 50036)
+++ grass/branches/develbranch_6/gui/wxpython/dbmgr/manager.py 2012-01-02 18:04:34 UTC (rev 50037)
@@ -1303,9 +1303,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/branches/develbranch_6/gui/wxpython/vdigit/wxdisplay.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/wxdisplay.py 2012-01-02 17:53:39 UTC (rev 50036)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/wxdisplay.py 2012-01-02 18:04:34 UTC (rev 50037)
@@ -225,7 +225,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
@@ -392,21 +392,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
Modified: grass/branches/develbranch_6/lib/vector/vedit/render.c
===================================================================
--- grass/branches/develbranch_6/lib/vector/vedit/render.c 2012-01-02 17:53:39 UTC (rev 50036)
+++ grass/branches/develbranch_6/lib/vector/vedit/render.c 2012-01-02 18:04:34 UTC (rev 50037)
@@ -134,9 +134,12 @@
(struct robject **)G_realloc(list_obj->item,
list_obj->nitems *
sizeof(struct robject *));
-
+
+ G_debug(1, "Vedit_render_map(): -> nitems = %d",
+ list_obj->nitems);
+
Vect_destroy_list(list);
-
+
return list_obj;
}
More information about the grass-commit
mailing list