[GRASS-SVN] r69644 - grass/branches/releasebranch_7_2/display/d.legend.vect
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Oct 2 17:46:40 PDT 2016
Author: annakrat
Date: 2016-10-02 17:46:40 -0700 (Sun, 02 Oct 2016)
New Revision: 69644
Modified:
grass/branches/releasebranch_7_2/display/d.legend.vect/main.c
Log:
d.legend.vect: separator option currently works only for user provided input file - make it explicit in the code (merge from trunk, r69643)
Modified: grass/branches/releasebranch_7_2/display/d.legend.vect/main.c
===================================================================
--- grass/branches/releasebranch_7_2/display/d.legend.vect/main.c 2016-10-03 00:44:59 UTC (rev 69643)
+++ grass/branches/releasebranch_7_2/display/d.legend.vect/main.c 2016-10-03 00:46:40 UTC (rev 69644)
@@ -167,6 +167,10 @@
fl_bg->description = _("Display legend background");
fl_bg->guisection = _("Background");
+ opt_sep = G_define_standard_option(G_OPT_F_SEP);
+ opt_sep->guisection = _("In/Out");
+ opt_sep->label = _("Field separator for input file");
+
opt_input = G_define_standard_option(G_OPT_F_INPUT);
opt_input->label = _("Input legend file");
opt_input->description = _("Path to legend file ");
@@ -180,8 +184,6 @@
opt_output->required = NO;
opt_output->guisection = _("In/Out");
- opt_sep = G_define_standard_option(G_OPT_F_SEP);
- opt_sep->guisection = _("In/Out");
/* Check command line */
if (G_parser(argc, argv)) {
@@ -250,14 +252,14 @@
fontcolor = D_parse_color(opt_fontcolor->answer, FALSE); /*default color: black */
/* I/O */
- sep = G_option_to_separator(opt_sep);
-
if (opt_input->answer) {
+ sep = G_option_to_separator(opt_sep);
file_name = opt_input->answer;
if (!file_name)
G_fatal_error(_("Unable to open input file <%s>"), file_name);
}
else {
+ sep = "|";
file_name = getenv("GRASS_LEGEND_FILE");
if (!file_name)
G_fatal_error("No legend file defined.");
More information about the grass-commit
mailing list