Changeset 12341 in josm for trunk/src/org
- Timestamp:
- 2017-06-08T01:04:57+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r12174 r12341 339 339 @Override 340 340 protected void finish() { 341 SwingUtilities.invokeLater(() -> { 342 fireMapPaintSylesUpdated(); 343 styles.clearCached(); 344 345 // Trigger a repaint of all data layers 346 Main.getLayerManager().getLayers() 347 .stream() 348 .filter(layer -> layer instanceof OsmDataLayer) 349 .forEach(Layer::invalidate); 350 }); 341 fireMapPaintSylesUpdated(); 342 afterStyleUpdate(); 351 343 } 352 344 … … 386 378 MapPaintPrefHelper.INSTANCE.put(data); 387 379 fireMapPaintSylesUpdated(); 388 styles.clearCached(); 389 Main.map.mapView.repaint(); 380 afterStyleUpdate(); 381 } 382 383 /** 384 * Manually trigger for now. TODO: Move this to a listener 385 */ 386 private static void afterStyleUpdate() { 387 SwingUtilities.invokeLater(() -> { 388 styles.clearCached(); 389 390 // Trigger a repaint of all data layers 391 Main.getLayerManager().getLayers() 392 .stream() 393 .filter(layer -> layer instanceof OsmDataLayer) 394 .forEach(Layer::invalidate); 395 }); 390 396 } 391 397 … … 416 422 fireMapPaintSylesUpdated(); 417 423 } 418 styles.clearCached(); 419 Main.map.mapView.repaint(); 424 afterStyleUpdate(); 420 425 } 421 426 … … 448 453 MapPaintPrefHelper.INSTANCE.put(styles.getStyleSources()); 449 454 fireMapPaintSylesUpdated(); 450 styles.clearCached(); 451 if (Main.isDisplayingMapView()) { 452 Main.map.mapView.repaint(); 453 } 455 afterStyleUpdate(); 454 456 } 455 457
Note:
See TracChangeset
for help on using the changeset viewer.