Ignore:
Timestamp:
2020-06-11T14:19:10+02:00 (4 years ago)
Author:
simon04
Message:

Add TableHelper.setSelectedIndices

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java

    r16553 r16601  
    745745            }
    746746            fireTableDataChanged();
    747             selectionModel.setValueIsAdjusting(true);
    748             selectionModel.clearSelection();
    749             for (ExtendedSourceEntry info: sources) {
    750                 int pos = data.indexOf(info);
    751                 if (pos >= 0) {
    752                     selectionModel.addSelectionInterval(pos, pos);
    753                 }
    754             }
    755             selectionModel.setValueIsAdjusting(false);
     747            TableHelper.setSelectedIndices(selectionModel, sources.stream().mapToInt(data::indexOf));
    756748        }
    757749
Note: See TracChangeset for help on using the changeset viewer.