Changeset 34214 in osm for applications/editors
- Timestamp:
- 2018-05-22T23:11:11+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java
r33786 r34214 36 36 import java.util.ArrayList; 37 37 import java.util.List; 38 import java.util.concurrent.ArrayBlockingQueue; 39 import java.util.concurrent.ThreadPoolExecutor; 40 import java.util.concurrent.TimeUnit; 38 41 39 42 import javax.swing.JOptionPane; … … 79 82 MapdustUpdateObserver, MapdustBugObserver { 80 83 84 /** Executor that will run the updates. */ 85 private static ThreadPoolExecutor executor = new ThreadPoolExecutor( 86 3, 5, 100, TimeUnit.SECONDS, new ArrayBlockingQueue<>(100), new ThreadPoolExecutor.DiscardPolicy()); 87 81 88 /** The graphical user interface of the plug-in */ 82 89 private MapdustGUI mapdustGUI; … … 532 539 */ 533 540 private void updatePluginData() { 534 MainApplication.worker.execute(new Runnable() { 535 @Override 536 public void run() { 537 updateMapdustData(); 538 } 539 }); 541 executor.execute(() -> updateMapdustData()); 540 542 } 541 543 … … 596 598 /* MapDust data was changed */ 597 599 mapdustGUI.update(mapdustBugList, this); 598 mapdustLayer. destroy();600 mapdustLayer.invalidate(); 599 601 mapdustLayer.update(mapdustGUI, mapdustBugList); 600 602 needRepaint = true;
Note:
See TracChangeset
for help on using the changeset viewer.