Changeset 1780 in josm for trunk/src/org
- Timestamp:
- 2009-07-13T14:41:19+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r1778 r1780 127 127 128 128 public void updateList() { 129 Relation selected = getSelected(); 129 130 list.setSize(Main.ds.relations.size()); 130 131 int i = 0; … … 141 142 setTitle(tr("Relations"), false); 142 143 } 144 selectRelation(selected); 143 145 } 144 146 … … 214 216 */ 215 217 public void selectRelation(Relation relation) { 216 if (relation == null) return; 218 if (relation == null) 219 { 220 displaylist.clearSelection(); 221 return; 222 } 217 223 int i = -1; 218 224 for (i=0; i < list.getSize(); i++) { … … 224 230 if (i >= 0 && i < list.getSize()) { 225 231 displaylist.setSelectedIndex(i); 232 displaylist.ensureIndexIsVisible(i); 233 } 234 else 235 { 236 displaylist.clearSelection(); 226 237 } 227 238 }
Note:
See TracChangeset
for help on using the changeset viewer.