Changeset 2894 in josm for trunk/src/org
- Timestamp:
- 2010-01-25T23:05:57+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r2885 r2894 221 221 } else { 222 222 model.setSelectedRelations(Collections.singletonList(relation)); 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)); 223 227 } 224 228 } … … 685 689 } 686 690 } 691 692 /** 693 * Returns the index of the relation 694 * 695 * @return index of relation (null if it cannot be found) 696 */ 697 public Integer getRelationIndex(Relation rel) { 698 int i = relations.indexOf(rel); 699 if (i<0) { 700 return null; 701 } 702 return i; 703 } 704 687 705 } 688 706
Note:
See TracChangeset
for help on using the changeset viewer.