[GRASS-SVN] r45627 - grass/branches/develbranch_6/display/d.legend
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Mar 10 23:57:51 EST 2011
Author: hamish
Date: 2011-03-10 20:57:50 -0800 (Thu, 10 Mar 2011)
New Revision: 45627
Modified:
grass/branches/develbranch_6/display/d.legend/main.c
Log:
Dylan: pass through format exactly as given by the user in the use= command line parameter, helps with log scale. (#1147; merge from trunk)
Modified: grass/branches/develbranch_6/display/d.legend/main.c
===================================================================
--- grass/branches/develbranch_6/display/d.legend/main.c 2011-03-11 04:57:27 UTC (rev 45626)
+++ grass/branches/develbranch_6/display/d.legend/main.c 2011-03-11 04:57:50 UTC (rev 45627)
@@ -876,10 +876,21 @@
sprintf(buff + strlen(buff), " %s", cstr);
}
else { /* is fp */
- if (!flip)
- sprintf(buff, DispFormat, catlist[i]);
- else
- sprintf(buff, DispFormat, catlist[catlistCount - i - 1]);
+ if (!flip) {
+ if(use_catlist)
+ /* pass through format exactly as given by the user in
+ the use= command line parameter (helps with log scale) */
+ sprintf(buff, "%s", opt8->answers[i]);
+ else
+ /* automatically generated/tuned decimal precision format */
+ sprintf(buff, DispFormat, catlist[i]);
+ }
+ else {
+ if(use_catlist)
+ sprintf(buff, "%s", opt8->answers[catlistCount - i - 1]);
+ else
+ sprintf(buff, DispFormat, catlist[catlistCount - i - 1]);
+ }
}
R_move_abs((l + 3 + dots_per_line), (cur_dot_row) - 3);
More information about the grass-commit
mailing list