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

File remove-primitive-selection-implementation.patch, 3.2 KB (added by hansendc, 15 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  
    3939    private static final int FLAG_DISABLED = 1 << 2;
    4040    private static final int FLAG_DELETED  = 1 << 3;
    4141    private static final int FLAG_FILTERED = 1 << 4;
    42     private static final int FLAG_SELECTED = 1 << 5;
    43     private static final int FLAG_HAS_DIRECTIONS = 1 << 6;
    44     private static final int FLAG_TAGGED = 1 << 7;
     42    private static final int FLAG_HAS_DIRECTIONS = 1 << 5;
     43    private static final int FLAG_TAGGED = 1 << 6;
    4544
    4645    /**
    4746     * Replies the sub-collection of {@see OsmPrimitive}s of type <code>type</code> present in
    abstract public class OsmPrimitive imple  
    174173    /**
    175174     * Sets whether this primitive is disabled or not.
    176175     *
    177      * @param selected true, if this primitive is disabled; false, otherwise
     176     * @param disabled true, if this primitive is disabled; false, otherwise
    178177     */
    179178    public void setDisabled(boolean disabled) {
    180179        if (disabled) {
    abstract public class OsmPrimitive imple  
    196195    /**
    197196     * Sets whether this primitive is filtered out or not.
    198197     *
    199      * @param selected true, if this primitive is filtered out; false, otherwise
     198     * @param filtered true, if this primitive is filtered out; false, otherwise
    200199     */
    201200    public void setFiltered(boolean filtered) {
    202201        if (filtered) {
    abstract public class OsmPrimitive imple  
    215214    }
    216215
    217216    /**
    218      * Sets whether this primitive is selected or not.
    219      *
    220      * @param selected  true, if this primitive is selected; false, otherwise
    221      * @since 1899
    222      */
    223     @Deprecated public void setSelected(boolean selected) {
    224         if (selected) {
    225             flags |= FLAG_SELECTED;
    226         } else {
    227             flags &= ~FLAG_SELECTED;
    228         }
    229     }
    230     /**
    231      * Replies true, if this primitive is selected.
    232      *
    233      * @return true, if this primitive is selected
    234      * @since 1899
    235      */
    236     @Deprecated public boolean isSelected() {
    237         return (flags & FLAG_SELECTED) != 0;
    238     }
    239 
    240     /**
    241217     * Marks this primitive as being modified.
    242218     *
    243219     * @param modified true, if this primitive is to be modified
    abstract public class OsmPrimitive imple  
    452428    /**
    453429     * Sets whether this primitive is deleted or not.
    454430     *
    455      * Also marks this primitive as modified if deleted is true and sets selected to false.
     431     * Also marks this primitive as modified if deleted is true.
    456432     *
    457433     * @param deleted  true, if this primitive is deleted; false, otherwise
    458434     */
    abstract public class OsmPrimitive imple  
    463439            flags &= ~FLAG_DELETED;
    464440        }
    465441        setModified(deleted);
    466         setSelected(false);
    467442    }
    468443
    469444    /**