Opened 13 years ago
Closed 13 years ago
#7344 closed defect (fixed)
Deleting multiple relations ends in failure
Reported by: | ToeBee | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | relation, delete | Cc: | ToeBee |
Description
Using 4877.
To reproduce:
Load attached file.
Select all the 0 member relations. (membership has nothing to do with it, this is just how I discovered it)
Click the delete button to delete selected relations
Click "Yes" repeatedly on the "You are about to delete 1 relation" warning.
The first two times, things behave correctly. Before clicking "Yes" the third time, notice that the warning message says you are about to delete a relation with a member - this is not what was selected. After this it will keep alternating between 0 member relations and 1 member relations until the 5th deletion at which point it throws an index out of bounds exception:
java.lang.IndexOutOfBoundsException: Index: 10, Size: 8 at java.util.ArrayList.rangeCheck(ArrayList.java:571) at java.util.ArrayList.get(ArrayList.java:349) at org.openstreetmap.josm.gui.dialogs.RelationListDialog$RelationListModel.getRelation(RelationListDialog.java:590) at org.openstreetmap.josm.gui.dialogs.RelationListDialog$DeleteAction.actionPerformed(RelationListDialog.java:341) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012) [...]
It seems like it is not updating the list of selected relations as it deletes them so relations are pulled up into the selection list as relations above them are deleted. But it is trying to delete based on the currently selected relations, not the list of relations that was selected when the operation began.
Attachments (1)
Change History (3)
by , 13 years ago
Attachment: | del_relation_bug.osm added |
---|
comment:1 by , 13 years ago
Priority: | normal → major |
---|
Simple data file to reproduce relation deletion bug