Changeset 11368 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-12-08T01:47:27+01:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r11294 r11368 57 57 * and on upload the object will be send to the server. 58 58 */ 59 protected static final short FLAG_MODIFIED = 1 << 0;59 protected static final short FLAG_MODIFIED = 0x0001; 60 60 61 61 /** … … 63 63 * as deleted on the server. 64 64 */ 65 protected static final short FLAG_VISIBLE = 1 << 1;65 protected static final short FLAG_VISIBLE = 0x0010; 66 66 67 67 /** … … 72 72 * objects still referring to it. 73 73 */ 74 protected static final short FLAG_DELETED = 1 << 2;74 protected static final short FLAG_DELETED = 0x0100; 75 75 76 76 /** … … 79 79 * fetched from the server. 80 80 */ 81 protected static final short FLAG_INCOMPLETE = 1 << 3;81 protected static final short FLAG_INCOMPLETE = 0x1000; 82 82 83 83 /** -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r11294 r11368 248 248 *--------*/ 249 249 public StyleCache mappaintStyle; 250 p ublic int mappaintCacheIdx;250 private short mappaintCacheIdx; 251 251 252 252 /* This should not be called from outside. Fixing the UI to add relevant … … 256 256 mappaintStyle = null; 257 257 } 258 259 /** 260 * Returns mappaint cache index. 261 * @return mappaint cache index 262 */ 263 public final short getMappaintCacheIdx() { 264 return mappaintCacheIdx; 265 } 266 267 /** 268 * Sets the mappaint cache index. 269 * @param mappaintCacheIdx mappaint cache index 270 */ 271 public final void setMappaintCacheIdx(short mappaintCacheIdx) { 272 this.mappaintCacheIdx = mappaintCacheIdx; 273 } 274 258 275 /* end of mappaint data */ 259 276 -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r11137 r11368 52 52 * The results are cached with respect to the current scale. 53 53 * 54 * Use {@link #setStyleSources(Collection)} to select the StyleSources that are 55 * applied. 54 * Use {@link #setStyleSources(Collection)} to select the StyleSources that are applied. 56 55 */ 57 56 public class ElemStyles implements PreferenceChangedListener { … … 59 58 private boolean drawMultipolygon; 60 59 61 private int cacheIdx = 1; 62 63 private boolean defaultNodes, defaultLines; 64 private int defaultNodesIdx, defaultLinesIdx; 60 private short cacheIdx = 1; 61 62 private boolean defaultNodes; 63 private boolean defaultLines; 64 65 private short defaultNodesIdx; 66 private short defaultLinesIdx; 65 67 66 68 private final Map<String, String> preferenceCache = new HashMap<>(); … … 112 114 */ 113 115 public Pair<StyleElementList, Range> getStyleCacheWithRange(OsmPrimitive osm, double scale, NavigatableComponent nc) { 114 if (osm.mappaintStyle == null || osm. mappaintCacheIdx!= cacheIdx || scale <= 0) {116 if (osm.mappaintStyle == null || osm.getMappaintCacheIdx() != cacheIdx || scale <= 0) { 115 117 osm.mappaintStyle = StyleCache.EMPTY_STYLECACHE; 116 118 } else { … … 170 172 + ", scale: " + scale + ", new stylelist: " + p.a + ", new range: " + p.b + ')', e); 171 173 } 172 osm. mappaintCacheIdx = cacheIdx;174 osm.setMappaintCacheIdx(cacheIdx); 173 175 return p; 174 176 }
Note:
See TracChangeset
for help on using the changeset viewer.