google-code-export / labyrinth

Automatically exported from code.google.com/p/labyrinth
GNU General Public License v2.0
2 stars 0 forks source link

Deletion of maps crashes #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Delete the next to last map.
2. Delete the last map.

What is the expected output? What do you see instead?

The last map should be deleted instead the following exception is thrown.

 Traceback (most recent call last):
  File "/home/matze/programming/labyrinth/trunk/src/Browser.py", line 261,
in delete_clicked
    MapList.delete (map)
  File "/home/matze/programming/labyrinth/trunk/src/MapList.py", line 136,
in delete
    del cls._maps[ index ]
IndexError: list assignment index out of range

Original issue reported on code.google.com by matthias...@gmail.com on 31 Mar 2008 at 10:53

GoogleCodeExporter commented 9 years ago
This is again this stupid MapList. The big problem is that the index of a map
reflects its position in the Browser. But if you change the order the index to
browser relation does not reflect this anymore.
There is an ID in the browser that should be taken for this purposes. See my 
checkins
for how to get the ID map relation.

Original comment by sinfr...@gmail.com on 1 Apr 2008 at 8:22

GoogleCodeExporter commented 9 years ago
This is fixed in revision 283.

Original comment by sinfr...@gmail.com on 2 Apr 2008 at 1:18