#2286: Duplicate calls to d.rast when using wx monitor and d.rast command line
---------------------+------------------------------------------------------
Reporter: hcho | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: | Platform: Linux
Cpu: x86-64 |
---------------------+------------------------------------------------------
When I do
{{{
d.mon wx0
d.rast elev
}}}
"d.rast elev" renders the raster map and saves its command to the command
file. Then, the wx monitor calls "d.rast elev" again because it's trying
to redraw previously added raster maps and overlay them with "elev".
IMO, to avoid duplicate calls to d.rast, if we call d.rast from the
command line and the selected monitor is wx, it should simply add d.rast
commands to the command file and let the monitor handle actual drawing.
or for multiple raster maps:
{{{
#!/bin/sh
maps=`g.mlist rast pattern="n[0-9]*w[0-9]*_1" sep=,`
g.region rast=$maps res=00:01:00
d.erase
monitor=`g.gisenv MONITOR`
cmdfile=`g.gisenv MONITOR_${monitor}_CMDFILE`
(
for i in `echo $maps | sed 's/,/ /g'`
do
echo d.rast $i
done
) > $cmdfile
}}}
#2286: Duplicate calls to d.rast when using wx monitor and d.rast command line
---------------------+------------------------------------------------------
Reporter: hcho | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: d.mon | Platform: Linux
Cpu: x86-64 |
---------------------+------------------------------------------------------
Comment(by wenzeslaus):
Replying to [ticket:2286 hcho]:
> IMO, to avoid duplicate calls to d.rast, if we call d.rast from the
command line and the selected monitor is wx, it should simply add d.rast
commands to the command file and let the monitor handle actual drawing.
Hm, I actually thought that this is how it was designed and what it is
doing. I this is the case, then what you are saying is clear bug and you
can safely fix it.