Changeset 8367 in josm
- Timestamp:
- 2015-05-16T16:43:46+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r8308 r8367 493 493 * @return a summary of the current JOSM selection 494 494 */ 495 public String getJOSMSelectionSummary() {495 public synchronized String getJOSMSelectionSummary() { 496 496 if (selection.isEmpty()) return tr("Selection"); 497 497 int numNodes = 0; … … 545 545 546 546 @Override 547 public OsmPrimitive getElementAt(int index) {547 public synchronized OsmPrimitive getElementAt(int index) { 548 548 return selection.get(index); 549 549 } 550 550 551 551 @Override 552 public int getSize() {552 public synchronized int getSize() { 553 553 return selection.size(); 554 554 } … … 560 560 * @return choosen elements in the view 561 561 */ 562 public Collection<OsmPrimitive> getSelected() {562 public synchronized Collection<OsmPrimitive> getSelected() { 563 563 Set<OsmPrimitive> sel = new HashSet<>(); 564 564 for(int i=0; i< getSize();i++) { … … 575 575 * @param sel the collection of primitives to select 576 576 */ 577 public void setSelected(Collection<OsmPrimitive> sel) {577 public synchronized void setSelected(Collection<OsmPrimitive> sel) { 578 578 selectionModel.clearSelection(); 579 579 if (sel == null) return; … … 598 598 * @param selection the collection of currently selected OSM objects 599 599 */ 600 public void setJOSMSelection(final Collection<? extends OsmPrimitive> selection) {600 public synchronized void setJOSMSelection(final Collection<? extends OsmPrimitive> selection) { 601 601 this.selection.clear(); 602 602 if (selection != null) { … … 636 636 * @param toUpdate the collection of primitives to update 637 637 */ 638 public void update(Collection<? extends OsmPrimitive> toUpdate) {638 public synchronized void update(Collection<? extends OsmPrimitive> toUpdate) { 639 639 if (toUpdate == null) return; 640 640 if (toUpdate.isEmpty()) return; … … 652 652 * Sorts the current elements in the selection 653 653 */ 654 public void sort() {654 public synchronized void sort() { 655 655 if (this.selection.size() <= Main.pref.getInteger("selection.no_sort_above", 100000)) { 656 656 boolean quick = this.selection.size() > Main.pref.getInteger("selection.fast_sort_above", 10000);
Note:
See TracChangeset
for help on using the changeset viewer.