Changeset 11079 in josm
- Timestamp:
- 2016-10-05T01:26:43+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r11065 r11079 497 497 /** 498 498 * Determines if this object is selectable. 499 * <p> 500 * A primitive can be selected if all conditions are met: 501 * <ul> 502 * <li>it is drawable 503 * <li>it is not disabled (greyed out) by a filter. 504 * </ul> 499 505 * @return {@code true} if this object is selectable 500 506 */ 501 507 public boolean isSelectable() { 502 return (flags & (FLAG_DELETED + FLAG_INCOMPLETE + FLAG_DISABLED + FLAG_HIDE_IF_DISABLED)) == 0; 508 // not synchronized -> check disabled twice just to be sure we did not have a race condition. 509 return !isDisabled() && isDrawable() && !isDisabled(); 503 510 } 504 511 505 512 /** 506 513 * Determines if this object is drawable. 514 * <p> 515 * A primitive is complete if all conditions are met: 516 * <ul> 517 * <li>type and id is known 518 * <li>tags are known 519 * <li>it is not deleted 520 * <li>it is not hidden by a filter 521 * <li>for nodes: lat/lon are known 522 * <li>for ways: all nodes are known and complete 523 * <li>for relations: all members are known and complete 524 * </ul> 507 525 * @return {@code true} if this object is drawable 508 526 */
Note:
See TracChangeset
for help on using the changeset viewer.