[GRASS-SVN] r47344 - grass/trunk/visualization/nviz2/cmd
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 2 05:52:17 EDT 2011
Author: martinl
Date: 2011-08-02 02:52:17 -0700 (Tue, 02 Aug 2011)
New Revision: 47344
Modified:
grass/trunk/visualization/nviz2/cmd/args.c
Log:
nviz_cmd: don't check slices when nslices is 0
Modified: grass/trunk/visualization/nviz2/cmd/args.c
===================================================================
--- grass/trunk/visualization/nviz2/cmd/args.c 2011-08-02 06:42:11 UTC (rev 47343)
+++ grass/trunk/visualization/nviz2/cmd/args.c 2011-08-02 09:52:17 UTC (rev 47344)
@@ -869,6 +869,8 @@
}
}
+ G_debug(3, "opt_get_num_answers(): opt=%s num=%d", opt->key, i);
+
return i;
}
@@ -1065,13 +1067,13 @@
/* slice transparency */
nconsts = opt_get_num_answers(params->slice_transp);
- if (nslices != nconsts)
+ if (nslices > 0 && nslices != nconsts)
G_fatal_error(_("Inconsistent number of attributes (<%s> %d: <%s> %d)"),
params->slice->key, nslices, params->slice_transp->key, nconsts);
/* slice position */
ncoords = opt_get_num_answers(params->slice_pos);
- if (ncoords != 6 * nslices)
+ if (nslices > 0 && ncoords != 6 * nslices)
G_fatal_error(_("Inconsistent number of attributes (<%s> %d: <%s> %d x 6)"),
params->slice->key, nslices, params->slice_pos->key, ncoords/6);
More information about the grass-commit
mailing list