Ignore:
Timestamp:
2017-01-16T22:34:15+01:00 (7 years ago)
Author:
bastiK
Message:

see #13124 - better cache invalidation

Fixes a problem when zoomed out, so all gpx data is in the center of the mapview.
Then moving the map did not update the gpx layer.

File:
1 edited

Legend:

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

    r11144 r11470  
    381381        }
    382382        return Main.getProjection().latlon2eastNorth(b.getCenter());
     383    }
     384
     385    /**
     386     * Check if this MapViewState equals another one, disregarding the position
     387     * of the JOSM window on screen.
     388     * @param other the other MapViewState
     389     * @return true if the other MapViewState has the same size, scale, position and projection,
     390     * false otherwise
     391     */
     392    public boolean equalsInWindow(MapViewState other) {
     393        return other != null &&
     394                this.viewWidth == other.viewWidth &&
     395                this.viewHeight == other.viewHeight &&
     396                this.scale == other.scale &&
     397                Objects.equals(this.topLeft, other.topLeft) &&
     398                Objects.equals(this.projecting, other.projecting);
    383399    }
    384400
Note: See TracChangeset for help on using the changeset viewer.