Changeset 14344 in josm
- Timestamp:
- 2018-10-17T17:25:28+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java
r12767 r14344 41 41 * @return The selected changesets 42 42 */ 43 public Set<Changeset> getSelectedChangesets() {43 public synchronized Set<Changeset> getSelectedChangesets() { 44 44 Set<Changeset> ret = new HashSet<>(); 45 45 for (int i = 0; i < getSize(); i++) { … … 55 55 * @return The selected ids 56 56 */ 57 public Set<Integer> getSelectedChangesetIds() {57 public synchronized Set<Integer> getSelectedChangesetIds() { 58 58 Set<Integer> ret = new HashSet<>(); 59 59 for (int i = 0; i < getSize(); i++) { … … 69 69 * @param changesets The changesets 70 70 */ 71 public void setSelectedChangesets(Collection<Changeset> changesets) {71 public synchronized void setSelectedChangesets(Collection<Changeset> changesets) { 72 72 selectionModel.setValueIsAdjusting(true); 73 73 selectionModel.clearSelection(); … … 91 91 } 92 92 93 private void updateModel() {93 private synchronized void updateModel() { 94 94 Set<Changeset> sel = getSelectedChangesets(); 95 95 data.clear(); … … 164 164 165 165 @Override 166 public Changeset getElementAt(int idx) {166 public synchronized Changeset getElementAt(int idx) { 167 167 return data.get(idx); 168 168 } 169 169 170 170 @Override 171 public int getSize() {171 public synchronized int getSize() { 172 172 return data.size(); 173 173 } 174 174 175 protected void sort() {175 protected synchronized void sort() { 176 176 data.sort(Comparator.comparingInt(Changeset::getId).reversed()); 177 177 } … … 191 191 * @return the selected open changesets 192 192 */ 193 public List<Changeset> getSelectedOpenChangesets() {193 public synchronized List<Changeset> getSelectedOpenChangesets() { 194 194 List<Changeset> ret = new ArrayList<>(); 195 195 for (int i = 0; i < getSize(); i++) { … … 208 208 /* ---------------------------------------------------------------------------- */ 209 209 @Override 210 public void changesetCacheUpdated(ChangesetCacheEvent event) {210 public synchronized void changesetCacheUpdated(ChangesetCacheEvent event) { 211 211 Set<Changeset> sel = getSelectedChangesets(); 212 212 for (Changeset cs: event.getAddedChangesets()) {
Note:
See TracChangeset
for help on using the changeset viewer.