Ticket #3696: remove-primitive-selection-implementation.2.patch

File remove-primitive-selection-implementation.2.patch, 3.2 KB (added by hansendc, 17 years ago)
  • (a) core/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java~remove-primitive-selection-implementation vs. (b) core-dave/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    
    ---
    
     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  
    4242    private static final int FLAG_DISABLED = 1 << 2;
    4343    private static final int FLAG_DELETED  = 1 << 3;
    4444    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;
    4847
    4948    /**
    5049     * Replies the sub-collection of {@see OsmPrimitive}s of type <code>type</code> present in
    abstract public class OsmPrimitive imple  
    184183    /**
    185184     * Sets whether this primitive is disabled or not.
    186185     *
    187      * @param selected true, if this primitive is disabled; false, otherwise
     186     * @param disabled true, if this primitive is disabled; false, otherwise
    188187     */
    189188    public void setDisabled(boolean disabled) {
    190189        if (disabled) {
    abstract public class OsmPrimitive imple  
    206205    /**
    207206     * Sets whether this primitive is filtered out or not.
    208207     *
    209      * @param selected true, if this primitive is filtered out; false, otherwise
     208     * @param filtered true, if this primitive is filtered out; false, otherwise
    210209     */
    211210    public void setFiltered(boolean filtered) {
    212211        if (filtered) {
    abstract public class OsmPrimitive imple  
    225224    }
    226225
    227226    /**
    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     /**
    251227     * Marks this primitive as being modified.
    252228     *
    253229     * @param modified true, if this primitive is to be modified
    abstract public class OsmPrimitive imple  
    470446    /**
    471447     * Sets whether this primitive is deleted or not.
    472448     *
    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.
    474450     *
    475451     * @param deleted  true, if this primitive is deleted; false, otherwise
    476452     */
    abstract public class OsmPrimitive imple  
    481457            flags &= ~FLAG_DELETED;
    482458        }
    483459        setModified(deleted);
    484         setSelected(false);
    485460    }
    486461
    487462    /**