Ignore:
Timestamp:
2010-03-11T21:01:49+01:00 (14 years ago)
Author:
jttt
Message:

Reuse offscreenBuffer if layers didn't change

File:
1 edited

Legend:

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

    r2801 r3116  
    679679        return n.substring(n.lastIndexOf('.')+1);
    680680    }
     681
     682    /**
     683     * Return a ID which is unique as long as viewport dimensions are the same
     684     */
     685    public int getViewID() {
     686        String x = center.east() + "_" + center.north() + "_" + scale + "_" +
     687        getWidth() + "_" + getHeight() + "_" + getProjection().toString();
     688        java.util.zip.CRC32 id = new java.util.zip.CRC32();
     689        id.update(x.getBytes());
     690        return (int)id.getValue();
     691    }
    681692}
Note: See TracChangeset for help on using the changeset viewer.