Ignore:
Timestamp:
2017-04-24T01:39:24+02:00 (2 years ago)
Author:
Don-vip
Message:

fix #5144 - Cannot draw new ways when filter is active (patch by michael2402)

Location:
trunk/src/org/openstreetmap/josm/actions/mapmode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r11713 r11993  
    12961296
    12971297    @Override
     1298    public Collection<? extends OsmPrimitive> getPreservedPrimitives() {
     1299        DataSet ds = getLayerManager().getEditDataSet();
     1300        return ds != null ? ds.getSelected() : null;
     1301    }
     1302
     1303    @Override
    12981304    public boolean layerIsSupported(Layer l) {
    12991305        return l instanceof OsmDataLayer;
  • trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java

    r11713 r11993  
    88import java.awt.event.MouseListener;
    99import java.awt.event.MouseMotionListener;
     10import java.util.Collection;
     11import java.util.Collections;
    1012
    1113import org.openstreetmap.josm.Main;
     
    1315import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;
    1416import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
     17import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1518import org.openstreetmap.josm.gui.MapFrame;
    1619import org.openstreetmap.josm.gui.layer.Layer;
     
    201204        readPreferences();
    202205    }
     206
     207    /**
     208     * Gets a collection of primitives that should not be hidden by the filter.
     209     * @return The primitives that the filter should not hide.
     210     * @since 11993
     211     */
     212    public Collection<? extends OsmPrimitive> getPreservedPrimitives() {
     213        return Collections.emptySet();
     214    }
    203215}
Note: See TracChangeset for help on using the changeset viewer.