- Timestamp:
- 2020-10-01T21:17:32+02:00 (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
src/org/openstreetmap/josm/data/ImageData.java (modified) (1 diff)
-
test/unit/org/openstreetmap/josm/data/ImageDataTest.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/ImageData.java
r16548 r17081 267 267 data.remove(img); 268 268 } 269 if (selectedImagesIndex.get(0) == data.size()) {269 if (selectedImagesIndex.get(0) >= data.size()) { 270 270 setSelectedImageIndex(data.size() - 1); 271 271 } else { -
trunk/test/unit/org/openstreetmap/josm/data/ImageDataTest.java
r15352 r17081 196 196 197 197 @Test 198 public void testRemoveSelectedImagesWithRemainingImages() { 199 List<ImageEntry> list = getOneImage(); 200 list.add(new ImageEntry()); 201 list.add(new ImageEntry()); 202 203 ImageData data = new ImageData(list); 204 data.selectLastImage(); 205 data.addImageToSelection(list.get(1)); 206 data.removeSelectedImages(); 207 assertEquals(1, data.getImages().size()); 208 assertEquals(1, data.getSelectedImages().size()); 209 } 210 211 @Test 198 212 public void testSelectImageAfterRemove() { 199 213 List<ImageEntry> list = getOneImage(); … … 347 361 data.selectFirstImage(); 348 362 assertEquals(1, data.getSelectedImages().size()); 349 350 363 } 351 364
Note:
See TracChangeset
for help on using the changeset viewer.
