Changeset 4288 in josm


Ignore:
Timestamp:
2011-08-07T21:27:38+02:00 (13 years ago)
Author:
bastiK
Message:

fix: also fire projection change, when switching between subprojections

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r4190 r4288  
    8585import org.openstreetmap.josm.tools.PlatformHookWindows;
    8686import org.openstreetmap.josm.tools.Shortcut;
     87import org.openstreetmap.josm.tools.Utils;
    8788
    8889abstract public class Main {
     
    823824    private static void fireProjectionChanged(Projection oldValue, Projection newValue) {
    824825        if (newValue == null ^ oldValue == null
    825                 || (newValue != null && oldValue != null && !newValue.getClass().getName().equals(oldValue.getClass().getName()))) {
     826                || (newValue != null && oldValue != null && !Utils.equal(newValue.toCode(), oldValue.toCode()))) {
    826827
    827828            synchronized(Main.class) {
  • trunk/src/org/openstreetmap/josm/data/projection/Lambert.java

    r4285 r4288  
    8686                InputStream is = Main.class.getResourceAsStream("/data/"+gridFileName);
    8787                if (is == null) {
    88                     throw new RuntimeException(tr("Warning: failed to open input stream for resource ''/data/{0}''. Cannot load NTF<->RGF93 grid", gridFileName));
     88                    throw new RuntimeException(tr("Error: failed to open input stream for resource ''/data/{0}''. Cannot load NTF<->RGF93 grid", gridFileName));
    8989                }
    9090                ntf_rgf93Grid = new NTV2GridShiftFile();
  • trunk/src/org/openstreetmap/josm/data/projection/LambertCC9Zones.java

    r4285 r4288  
    145145
    146146    @Override
    147     public void setPreferences(Collection<String> args)
    148     {
     147    public void setPreferences(Collection<String> args) {
    149148        int layoutZone = DEFAULT_ZONE;
    150149        if (args != null) {
  • trunk/src/org/openstreetmap/josm/data/projection/Projection.java

    r3872 r4288  
    3838
    3939    /**
    40      * Return projection code.
     40     * Return projection code. This should be a unique identifier.
     41     * If projection supports parameters, return a different code
     42     * for each set of parameters.
     43     *
     44     * The EPSG code can be used (if defined for the projection).
    4145     */
    4246    String toCode();
Note: See TracChangeset for help on using the changeset viewer.