Changeset 3466 in josm for trunk


Ignore:
Timestamp:
2010-08-25T10:05:40+02:00 (14 years ago)
Author:
stoecker
Message:

see #5372 - fix missing style switch

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r3398 r3466  
    305305       get/set functions calling this implicitely is preferred, so we can have
    306306       transparent cache handling in the future. */
    307     protected void clearCached()
     307    public void clearCached()
    308308    {
    309309        mappaintDrawnCode = 0;
  • trunk/src/org/openstreetmap/josm/gui/preferences/MapPaintPreference.java

    r3225 r3466  
    1717
    1818import org.openstreetmap.josm.Main;
     19import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1920import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    2021import org.openstreetmap.josm.tools.GBC;
     
    9091            restart = true;
    9192        }
    92         Main.pref.put("mappaint.style", styleCombo.getEditor().getItem().toString());
     93        if(Main.pref.put("mappaint.style", styleCombo.getEditor().getItem().toString()))
     94        {
     95          for(OsmPrimitive osm : Main.main.getCurrentDataSet().allPrimitives())
     96          {
     97            osm.clearCached();
     98          }
     99        }
    93100        return restart;
    94101    }
Note: See TracChangeset for help on using the changeset viewer.