Changeset 3467 in josm for trunk


Ignore:
Timestamp:
2010-08-25T11:55:50+02:00 (14 years ago)
Author:
stoecker
Message:

see #5372 - extend clean for all layers

File:
1 edited

Legend:

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

    r3466 r3467  
    1818import org.openstreetmap.josm.Main;
    1919import org.openstreetmap.josm.data.osm.OsmPrimitive;
     20import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2021import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    2122import org.openstreetmap.josm.tools.GBC;
     
    9192            restart = true;
    9293        }
    93         if(Main.pref.put("mappaint.style", styleCombo.getEditor().getItem().toString()))
     94        if(Main.pref.put("mappaint.style", styleCombo.getEditor().getItem().toString())
     95        && Main.isDisplayingMapView())
    9496        {
    95           for(OsmPrimitive osm : Main.main.getCurrentDataSet().allPrimitives())
     97          for(OsmDataLayer l : Main.map.mapView.getLayersOfType(OsmDataLayer.class))
    9698          {
    97             osm.clearCached();
     99            for(OsmPrimitive osm : l.data.allPrimitives())
     100            {
     101              osm.clearCached();
     102            }
    98103          }
    99104        }
Note: See TracChangeset for help on using the changeset viewer.