---
core-dave/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java | 35 +---------
1 file changed, 5 insertions(+), 30 deletions(-)
diff -puN src/org/openstreetmap/josm/data/osm/OsmPrimitive.java~remove-primitive-selection-implementation src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
|
a
|
b
|
abstract public class OsmPrimitive imple
|
| 42 | 42 | private static final int FLAG_DISABLED = 1 << 2; |
| 43 | 43 | private static final int FLAG_DELETED = 1 << 3; |
| 44 | 44 | private static final int FLAG_FILTERED = 1 << 4; |
| 45 | | private static final int FLAG_SELECTED = 1 << 5; |
| 46 | | private static final int FLAG_HAS_DIRECTIONS = 1 << 6; |
| 47 | | private static final int FLAG_TAGGED = 1 << 7; |
| | 45 | private static final int FLAG_HAS_DIRECTIONS = 1 << 5; |
| | 46 | private static final int FLAG_TAGGED = 1 << 6; |
| 48 | 47 | |
| 49 | 48 | /** |
| 50 | 49 | * Replies the sub-collection of {@see OsmPrimitive}s of type <code>type</code> present in |
| … |
… |
abstract public class OsmPrimitive imple
|
| 184 | 183 | /** |
| 185 | 184 | * Sets whether this primitive is disabled or not. |
| 186 | 185 | * |
| 187 | | * @param selected true, if this primitive is disabled; false, otherwise |
| | 186 | * @param disabled true, if this primitive is disabled; false, otherwise |
| 188 | 187 | */ |
| 189 | 188 | public void setDisabled(boolean disabled) { |
| 190 | 189 | if (disabled) { |
| … |
… |
abstract public class OsmPrimitive imple
|
| 206 | 205 | /** |
| 207 | 206 | * Sets whether this primitive is filtered out or not. |
| 208 | 207 | * |
| 209 | | * @param selected true, if this primitive is filtered out; false, otherwise |
| | 208 | * @param filtered true, if this primitive is filtered out; false, otherwise |
| 210 | 209 | */ |
| 211 | 210 | public void setFiltered(boolean filtered) { |
| 212 | 211 | if (filtered) { |
| … |
… |
abstract public class OsmPrimitive imple
|
| 225 | 224 | } |
| 226 | 225 | |
| 227 | 226 | /** |
| 228 | | * Sets whether this primitive is selected or not. |
| 229 | | * |
| 230 | | * @param selected true, if this primitive is selected; false, otherwise |
| 231 | | * @since 1899 |
| 232 | | */ |
| 233 | | @Deprecated public void setSelected(boolean selected) { |
| 234 | | if (selected) { |
| 235 | | flags |= FLAG_SELECTED; |
| 236 | | } else { |
| 237 | | flags &= ~FLAG_SELECTED; |
| 238 | | } |
| 239 | | } |
| 240 | | /** |
| 241 | | * Replies true, if this primitive is selected. |
| 242 | | * |
| 243 | | * @return true, if this primitive is selected |
| 244 | | * @since 1899 |
| 245 | | */ |
| 246 | | @Deprecated public boolean isSelected() { |
| 247 | | return (flags & FLAG_SELECTED) != 0; |
| 248 | | } |
| 249 | | |
| 250 | | /** |
| 251 | 227 | * Marks this primitive as being modified. |
| 252 | 228 | * |
| 253 | 229 | * @param modified true, if this primitive is to be modified |
| … |
… |
abstract public class OsmPrimitive imple
|
| 470 | 446 | /** |
| 471 | 447 | * Sets whether this primitive is deleted or not. |
| 472 | 448 | * |
| 473 | | * Also marks this primitive as modified if deleted is true and sets selected to false. |
| | 449 | * Also marks this primitive as modified if deleted is true. |
| 474 | 450 | * |
| 475 | 451 | * @param deleted true, if this primitive is deleted; false, otherwise |
| 476 | 452 | */ |
| … |
… |
abstract public class OsmPrimitive imple
|
| 481 | 457 | flags &= ~FLAG_DELETED; |
| 482 | 458 | } |
| 483 | 459 | setModified(deleted); |
| 484 | | setSelected(false); |
| 485 | 460 | } |
| 486 | 461 | |
| 487 | 462 | /** |