Changeset 11294 in josm
- Timestamp:
- 2016-11-22T16:07:59+01:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r11288 r11294 57 57 * and on upload the object will be send to the server. 58 58 */ 59 protected static final int FLAG_MODIFIED = 1 << 0;59 protected static final short FLAG_MODIFIED = 1 << 0; 60 60 61 61 /** … … 63 63 * as deleted on the server. 64 64 */ 65 protected static final int FLAG_VISIBLE = 1 << 1;65 protected static final short FLAG_VISIBLE = 1 << 1; 66 66 67 67 /** … … 72 72 * objects still referring to it. 73 73 */ 74 protected static final int FLAG_DELETED = 1 << 2;74 protected static final short FLAG_DELETED = 1 << 2; 75 75 76 76 /** … … 79 79 * fetched from the server. 80 80 */ 81 protected static final int FLAG_INCOMPLETE = 1 << 3;81 protected static final short FLAG_INCOMPLETE = 1 << 3; 82 82 83 83 /** … … 277 277 /* ------*/ 278 278 279 protected void updateFlags( int flag, boolean value) {279 protected void updateFlags(short flag, boolean value) { 280 280 if (value) { 281 281 flags |= flag; 282 282 } else { 283 flags &= ~flag;283 flags &= (short) ~flag; 284 284 } 285 285 } -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r11292 r11294 52 52 * while the filter is active. 53 53 */ 54 protected static final int FLAG_DISABLED = 1 << 4;54 protected static final short FLAG_DISABLED = 1 << 4; 55 55 56 56 /** … … 63 63 * unset as well (for efficient access). 64 64 */ 65 protected static final int FLAG_HIDE_IF_DISABLED = 1 << 5;65 protected static final short FLAG_HIDE_IF_DISABLED = 1 << 5; 66 66 67 67 /** 68 68 * Flag used internally by the filter mechanism. 69 69 */ 70 protected static final int FLAG_DISABLED_TYPE = 1 << 6;70 protected static final short FLAG_DISABLED_TYPE = 1 << 6; 71 71 72 72 /** 73 73 * Flag used internally by the filter mechanism. 74 74 */ 75 protected static final int FLAG_HIDDEN_TYPE = 1 << 7;75 protected static final short FLAG_HIDDEN_TYPE = 1 << 7; 76 76 77 77 /** … … 80 80 * (e.g. one way street.) 81 81 */ 82 protected static final int FLAG_HAS_DIRECTIONS = 1 << 8;82 protected static final short FLAG_HAS_DIRECTIONS = 1 << 8; 83 83 84 84 /** … … 86 86 * Some trivial tags like source=* are ignored here. 87 87 */ 88 protected static final int FLAG_TAGGED = 1 << 9;88 protected static final short FLAG_TAGGED = 1 << 9; 89 89 90 90 /** … … 93 93 * (E.g. oneway=-1.) 94 94 */ 95 protected static final int FLAG_DIRECTION_REVERSED = 1 << 10;95 protected static final short FLAG_DIRECTION_REVERSED = 1 << 10; 96 96 97 97 /** … … 100 100 * that the primitive is currently highlighted. 101 101 */ 102 protected static final int FLAG_HIGHLIGHTED = 1 << 11;102 protected static final short FLAG_HIGHLIGHTED = 1 << 11; 103 103 104 104 /** … … 106 106 * Match the "work in progress" tags in default map style. 107 107 */ 108 protected static final int FLAG_ANNOTATED = 1 << 12;108 protected static final short FLAG_ANNOTATED = 1 << 12; 109 109 110 110 /** … … 396 396 /* ------*/ 397 397 398 private void updateFlagsNoLock( int flag, boolean value) {398 private void updateFlagsNoLock(short flag, boolean value) { 399 399 super.updateFlags(flag, value); 400 400 } 401 401 402 402 @Override 403 protected final void updateFlags( int flag, boolean value) {403 protected final void updateFlags(short flag, boolean value) { 404 404 boolean locked = writeLock(); 405 405 try { … … 440 440 try { 441 441 int oldFlags = flags; 442 updateFlagsNoLock(FLAG_DISABLED + FLAG_HIDE_IF_DISABLED, false); 442 updateFlagsNoLock(FLAG_DISABLED, false); 443 updateFlagsNoLock(FLAG_HIDE_IF_DISABLED, false); 443 444 return oldFlags != flags; 444 445 } finally { -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r11285 r11294 806 806 LineMetrics metrics = text.font.getLineMetrics(s, frc); 807 807 if (bs.vAlign == VerticalTextAlignment.ABOVE) { 808 y -= -box.y + metrics.getDescent();808 y -= -box.y + (int) metrics.getDescent(); 809 809 } else if (bs.vAlign == VerticalTextAlignment.TOP) { 810 y -= -box.y - metrics.getAscent();810 y -= -box.y - (int) metrics.getAscent(); 811 811 } else if (bs.vAlign == VerticalTextAlignment.CENTER) { 812 y += ( metrics.getAscent() - metrics.getDescent()) / 2;812 y += (int) ((metrics.getAscent() - metrics.getDescent()) / 2); 813 813 } else if (bs.vAlign == VerticalTextAlignment.BELOW) { 814 y += box.y + box.height + metrics.getAscent() + 2;814 y += box.y + box.height + (int) metrics.getAscent() + 2; 815 815 } else throw new AssertionError(); 816 816 } -
trunk/src/org/openstreetmap/josm/tools/MultiLineFlowLayout.java
r10717 r11294 75 75 x += getHgap(); 76 76 } 77 x += size. getWidth();77 x += size.width; 78 78 if (x > containerWidth) { 79 79 totalHeight += rowHeight + getVgap();
Note:
See TracChangeset
for help on using the changeset viewer.