- Timestamp:
- 2011-08-21T17:53:28+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r4329 r4330 827 827 List<Tile> missedTiles = new LinkedList<Tile>(); 828 828 // The callers of this code *require* that we return any tiles 829 // that we do not draw in missedTiles. ts.allTiles() by default 830 // will only return already-existing tiles. However, we need 831 // to return *all* tiles to the callers, so force creation here. 829 // that we do not draw in missedTiles. ts.allExistingTiles() by 830 // default will only return already-existing tiles. However, we 831 // need to return *all* tiles to the callers, so force creation 832 // here. 832 833 boolean forceTileCreation = true; 833 for (Tile tile : ts.allTiles (forceTileCreation)) {834 for (Tile tile : ts.allTilesCreate()) { 834 835 Image img = getLoadedTileImage(tile); 835 836 if (img == null || tile.hasError()) { … … 1012 1013 * already in the tileCache. 1013 1014 */ 1014 List<Tile> all Tiles()1015 List<Tile> allExistingTiles() 1015 1016 { 1016 return this.allTiles(false); 1017 } 1018 private List<Tile> allTiles(boolean create) 1017 return this.__allTiles(false); 1018 } 1019 List<Tile> allTilesCreate() 1020 { 1021 return this.__allTiles(true); 1022 } 1023 private List<Tile> __allTiles(boolean create) 1019 1024 { 1020 1025 // Tileset is either empty or too large … … 1040 1045 { 1041 1046 List<Tile> ret = new ArrayList<Tile>(); 1042 for (Tile t : this.all Tiles()) {1047 for (Tile t : this.allExistingTiles()) { 1043 1048 if (t.isLoaded()) 1044 1049 ret.add(t); … … 1051 1056 if (!autoLoad && !force) 1052 1057 return; 1053 for (Tile t : this.allTiles (true)) {1058 for (Tile t : this.allTilesCreate()) { 1054 1059 loadTile(t, false); 1055 1060 } … … 1060 1065 if (!autoLoad && !force) 1061 1066 return; 1062 for (Tile t : this.allTiles (true)) {1067 for (Tile t : this.allTilesCreate()) { 1063 1068 if (t.hasError()) { 1064 1069 loadTile(t, true); … … 1076 1081 1077 1082 private static TileSetInfo getTileSetInfo(TileSet ts) { 1078 List<Tile> allTiles = ts.all Tiles();1083 List<Tile> allTiles = ts.allExistingTiles(); 1079 1084 TileSetInfo result = new TileSetInfo(); 1080 1085 result.hasLoadingTiles = allTiles.size() < ts.size(); … … 1252 1257 // The current zoom tileset is guaranteed to have all of 1253 1258 // its tiles 1254 for (Tile t : ts.all Tiles()) {1259 for (Tile t : ts.allExistingTiles()) { 1255 1260 this.paintTileText(ts, t, g, mv, displayZoomLevel, t); 1256 1261 } … … 1340 1345 } 1341 1346 Tile clickedTile = null; 1342 for (Tile t1 : ts.all Tiles()) {1347 for (Tile t1 : ts.allExistingTiles()) { 1343 1348 Tile t2 = tempCornerTile(t1); 1344 1349 Rectangle r = new Rectangle(pixelPos(t1));
Note:
See TracChangeset
for help on using the changeset viewer.