[GRASS-SVN] r69127 - grass-addons/grass7/display/d.legend.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 11 00:04:30 PDT 2016


Author: lazaa
Date: 2016-08-11 00:04:30 -0700 (Thu, 11 Aug 2016)
New Revision: 69127

Modified:
   grass-addons/grass7/display/d.legend.vect/draw.c
Log:
Updated for symbol size -1

Modified: grass-addons/grass7/display/d.legend.vect/draw.c
===================================================================
--- grass-addons/grass7/display/d.legend.vect/draw.c	2016-08-10 19:28:49 UTC (rev 69126)
+++ grass-addons/grass7/display/d.legend.vect/draw.c	2016-08-11 07:04:30 UTC (rev 69127)
@@ -87,7 +87,7 @@
             G_free_tokens(tokens);
 
             /* Symbol */
-            if (strcmp(type_str,"point")!=0) {
+            if (((strcmp(type_str,"point") != 0) && (strcmp(type_str, "centroid") != 0)) || size < 0) {
                 size = symb_size;
             }
             Symb = S_read(symb_name);
@@ -137,7 +137,7 @@
             /* Group subtitle */
             label = G_malloc(GNAME_MAX);
             part = strtok(buf, sep);
-            sscanf(part, "%s", label);
+            label = G_store(part);
 
             D_text_size(sub_size, sub_size);
             D_font(sub_font);
@@ -174,7 +174,7 @@
             G_free_tokens(tokens);
 
             /* Symbol */
-            if ((strcmp(type_str,"point") != 0) && (strcmp(type_str, "centroid") != 0)) {
+            if (((strcmp(type_str,"point") != 0) && (strcmp(type_str, "centroid") != 0)) || size < 0) {
                 size = symb_size;
             }
             Symb = S_read(symb_name);



More information about the grass-commit mailing list