Opened 10 years ago

Closed 9 years ago

#2286 closed defect (fixed)

Duplicate calls to d.rast when using wx monitor and d.rast command line

Reported by: hcho Owned by: martinl
Priority: major Milestone: 7.0.0
Component: Display Version: svn-trunk
Keywords: d.mon, rendering Cc: grass-dev@…
CPU: x86-64 Platform: Linux

Description

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.

Change History (6)

comment:1 by neteler, 10 years ago

Keywords: d.mon added

comment:2 by hcho, 10 years ago

Ugly hack:

d.mon wx0
echo "d.rast elev" > `g.gisenv MONITOR_WX0_CMDFILE`

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

in reply to:  description comment:3 by wenzeslaus, 10 years ago

Replying to 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.

comment:4 by wenzeslaus, 9 years ago

Keywords: rendering added

Do you think this is related to (or the same as) comment:5:ticket:2509 (creating unnecessary map.png in current directory when d.mon wx0 is active)?

comment:5 by martinl, 9 years ago

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

comment:6 by martinl, 9 years ago

Resolution: fixed
Status: assignedclosed

This issue has been already solved in trunk. I am taking liberty to close the ticket, feel free to open if needed.

Note: See TracTickets for help on using tickets.