Changeset 851 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2008-08-23T22:17:49+02:00 (16 years ago)
Author:
stoecker
Message:

fixed style acces in case of external mappaint styles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r791 r851  
    3838
    3939                String styleName = Main.pref.get("mappaint.style", "standard");
     40                // fallback to standard name for internal case, as we only have one internal style
     41                String internalStyleName = "standard";
    4042                styleDir = Main.pref.get("mappaint.styledir", Main.pref.getPreferencesDir()+"plugins/mappaint/"+styleName+"/");
    4143                String elemStylesFile = getStyleDir()+"elemstyles.xml";
    4244                imageDir = styleDir+"icons/";
     45                internalImageDir = "/images/styles/"+internalStyleName+"/";
    4346
    4447//              System.out.println("mappaint: Using style: " + styleName);
     
    6568                }
    6669                else {// reading the builtin file from the plugin jar file
    67                         URL elemStylesPath = Main.class.getResource("/styles/"+styleName+"/elemstyles.xml");
     70                        URL elemStylesPath = Main.class.getResource("/styles/"+internalStyleName+"/elemstyles.xml");
    6871
    6972//                      System.out.println("mappaint: Using jar's elemstyles.xml: \"" + elemStylesPath + "\"");
    7073                        if (elemStylesPath != null)
    7174                        {
    72                                 internalImageDir = "/images/styles/"+styleName+"/";
    7375                                isInternal = true;
    7476                                try
Note: See TracChangeset for help on using the changeset viewer.