[GRASS-SVN] r61612 - grass/trunk/lib/ogsf

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 13 19:20:28 PDT 2014


Author: annakrat
Date: 2014-08-13 19:20:28 -0700 (Wed, 13 Aug 2014)
New Revision: 61612

Modified:
   grass/trunk/lib/ogsf/Gp3.c
   grass/trunk/lib/ogsf/Gv3.c
Log:
libogsf: uninitialized variable causes unresponsive vector style settings

Modified: grass/trunk/lib/ogsf/Gp3.c
===================================================================
--- grass/trunk/lib/ogsf/Gp3.c	2014-08-13 21:58:43 UTC (rev 61611)
+++ grass/trunk/lib/ogsf/Gp3.c	2014-08-14 02:20:28 UTC (rev 61612)
@@ -120,6 +120,8 @@
 	    else {
 		Vect_reset_cats(Cats);
 	    }
+	    /* initialize style */
+	    gpt->highlighted = 0;
 	    
 	    G_debug(5, "loading vector point %d x=%f y=%f ncats=%d",
 		    np, Points->x[0], Points->y[0], Cats->n_cats);

Modified: grass/trunk/lib/ogsf/Gv3.c
===================================================================
--- grass/trunk/lib/ogsf/Gv3.c	2014-08-13 21:58:43 UTC (rev 61611)
+++ grass/trunk/lib/ogsf/Gv3.c	2014-08-14 02:20:28 UTC (rev 61612)
@@ -97,6 +97,10 @@
 	Vect_get_area_points(&map, area, points);
 	if (points->n_points < 3)
 	    continue;
+
+	/* initialize style */
+	gln->highlighted = 0;
+
 	gln->type = OGSF_POLYGON;
 	gln->npts = np = points->n_points;
 	G_debug(3, "  np = %d", np);
@@ -174,6 +178,9 @@
 		/* Vect_append_point ( points, points->x[0], points->y[0], points->z[0] ); */
 	    }
 
+	    /* initialize style */
+	    gln->highlighted = 0;
+
 	    gln->npts = np = points->n_points;
 	    G_debug(3, "  np = %d", np);
 



More information about the grass-commit mailing list