Changeset 2914 in josm for trunk/src/org
- Timestamp:
- 2010-01-31T18:07:03+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r2894 r2914 222 222 model.setSelectedRelations(Collections.singletonList(relation)); 223 223 Integer i = model.getRelationIndex(relation); 224 if (i == null)225 throw new AssertionError(); /* the relation list should contain *all* relations */226 displaylist.scrollRectToVisible(displaylist.getCellBounds(i, i));224 if (i != null) { // Not all relations have to be in the list (for example when the relation list is hidden, it's not updated with new relations) 225 displaylist.scrollRectToVisible(displaylist.getCellBounds(i, i)); 226 } 227 227 } 228 228 } … … 693 693 * Returns the index of the relation 694 694 * 695 * @return index of relation (null if it cannot be found) 695 * @return index of relation (null if it cannot be found) 696 696 */ 697 697 public Integer getRelationIndex(Relation rel) { 698 698 int i = relations.indexOf(rel); 699 if (i<0) {699 if (i<0) 700 700 return null; 701 }702 701 return i; 703 702 } 704 703 705 704 } 706 705
Note:
See TracChangeset
for help on using the changeset viewer.