Opened 11 years ago

Closed 4 years ago

Last modified 4 years ago

#1483 closed defect (fixed)

need error trapping in cartographic composer

Reported by: cmbarton Owned by: grass-dev@…
Priority: normal Milestone: 7.0.7
Component: wxGUI Version: svn-trunk
Keywords: ps.map, cartographic composer Cc: annakrat
CPU: Unspecified Platform: Unspecified

Description

If you do the following, you get an error in the GUI for ps.map

  1. create a map frame and add a map to it
  2. close the map frame dialog
  3. reopen the map frame dialog and select delete under the menu (why can't you delete a single map instead of deleting the whole frame??)
  4. without closing the map frame dialog, select another map and add it (note that the map frame is gone from the thumbnail).
  5. click "apply"

Here is the error:

Traceback (most recent call last):
  File "/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/etc
/gui/wxpython/gui_modules/psmap_dialogs.py", line 1966, in
OnApply

okR = self.rPanel.update()
  File "/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/etc
/gui/wxpython/gui_modules/psmap_dialogs.py", line 2616, in
update

if self.rasterDict['raster'] != map['drawMap']:
TypeError
:
list indices must be integers, not str

I found this in the most recent build of GRASS 7 (28-October-2011) but don't know if it affects other versions as well (probably does).

Change History (13)

comment:1 by annakrat, 11 years ago

Cc: annakrat added

Please, try r49005

Anna

comment:2 by cmbarton, 11 years ago

This particular error is fixed. Thanks. However, I managed to generate another error two doing things that I am not supposed to do. I haven't had time to figure out exactly how to replicate them. So I'll leave this open until I can do that.

Michael

comment:3 by annakrat, 11 years ago

I assume that some of these errors probably result from opening more modeless dialogs at the same time. The situation you described here seemed very improbable to me. If you want to remove raster without removing the frame, you can do it in the raster dialog by choosing the 'no raster map' option.

Anna

comment:4 by cmbarton, 11 years ago

Actually, I'm getting the new errors without opening new windows. I'm sure I'm doing something (looking at an empty map or something like that) that is somehow "incorrect". Just need to get these ID'ed and trapped. I'll try to get it narrowed down.

Michael

comment:5 by cmbarton, 11 years ago

Something weird is going on with ps.map out of the cartographic composer. Vectors are showing up as low resolution rasters, with coarse pixelation even in the pdf output.

Michael

comment:6 by cmbarton, 11 years ago

More information. The problem is with the dot-dashed line style. It looks really bad if you use it with streams in the nc07 demo data set and region set to match the elevation DEM. The dashed style doesn't look much better.

A further problem is that if you put the same vector map in twice and try to have each layer of the vector styled differently (e.g., a wide line in one color, overlaid by a narrow line in a different color), both layers take on the properties of the most recent one defined. This may be happening with any vectors overlaid. I don't know if this is a wxGUI or ps.map problem.

Michael

in reply to:  6 comment:7 by annakrat, 11 years ago

Replying to cmbarton:

More information. The problem is with the dot-dashed line style. It looks really bad if you use it with streams in the nc07 demo data set and region set to match the elevation DEM. The dashed style doesn't look much better.

You can try to use your own line style by typing zeros and ones to the line style combo, e.g. 01. For explanation, see ps.map manual (instruction vlines - style). Then, don't forget to set width (e.g. 0.5). I tried it and it works fine for me.

A further problem is that if you put the same vector map in twice and try to have each layer of the vector styled differently (e.g., a wide line in one color, overlaid by a narrow line in a different color), both layers take on the properties of the most recent one defined. This may be happening with any vectors overlaid. I don't know if this is a wxGUI or ps.map problem.

This is wxGUI problem and I know about it, I would like to rewrite this part so please be patient.

Anna

comment:8 by cmbarton, 11 years ago

OK. Thanks Anna.

comment:9 by martinl, 7 years ago

Milestone: 7.0.07.0.5

comment:10 by neteler, 6 years ago

Milestone: 7.0.57.0.6

comment:11 by neteler, 5 years ago

Milestone: 7.0.67.0.7

comment:12 by martinl, 4 years ago

Resolution: fixed
Status: newclosed

No activity for a long time, closing. Feel free to reopen if needed.

comment:13 by cmbarton, 4 years ago

This seems fixed now

Note: See TracTickets for help on using tickets.