[GRASS-SVN] r42206 - grass/trunk/display/d.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Mon May 10 05:52:03 EDT 2010


Author: mmetz
Date: 2010-05-10 05:52:02 -0400 (Mon, 10 May 2010)
New Revision: 42206

Modified:
   grass/trunk/display/d.vect/main.c
Log:
display area labels also when not displaying centroids, i.e. type=area only

Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c	2010-05-10 09:04:35 UTC (rev 42205)
+++ grass/trunk/display/d.vect/main.c	2010-05-10 09:52:02 UTC (rev 42206)
@@ -672,9 +672,15 @@
 	if (display & DISP_CAT)
 	    stat = label(&Map, type, area, Clist, &lattr, chcat);
 
-	if (display & DISP_ATTR)
+	if (display & DISP_ATTR) {
+	    int attr_type = type;
+
+	    if (area && !(attr_type & GV_CENTROID))
+		attr_type |= GV_CENTROID;
+		
 	    stat =
-		attr(&Map, type, attrcol_opt->answer, Clist, &lattr, chcat);
+		attr(&Map, attr_type, attrcol_opt->answer, Clist, &lattr, chcat);
+	    }
 
 	if (display & DISP_ZCOOR)
 	    stat = zcoor(&Map, type, &lattr);



More information about the grass-commit mailing list