Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 15888)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 15889)
@@ -32,4 +32,6 @@
 import java.util.Collections;
 import java.util.Comparator;
+import java.util.EnumSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -72,4 +74,5 @@
 import org.openstreetmap.josm.data.osm.OsmDataManager;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.data.osm.Tag;
 import org.openstreetmap.josm.data.osm.search.SearchCompiler;
@@ -86,8 +89,6 @@
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
-import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingComboBox;
 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager;
-import org.openstreetmap.josm.gui.tagging.presets.TaggingPresets;
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.util.WindowGeometry;
@@ -684,16 +685,16 @@
                 return;
             }
-            final Tag tag = new Tag(keys.getSelectedOrEditItem(), values.getSelectedOrEditItem());
-            buttons.get(0).setIcon(findIcon(tag)
+            buttons.get(0).setIcon(findIcon(keys.getSelectedOrEditItem(), values.getSelectedOrEditItem())
                     .orElse(ImageProvider.get("ok", ImageProvider.ImageSizes.LARGEICON)));
         }
 
-        protected Optional<ImageIcon> findIcon(Tag tag) {
-            final Optional<ImageIcon> taggingPresetIcon = TaggingPresets.getMatchingPresets(null, tag.getKeys(), false).stream()
-                    .map(preset -> preset.getIcon(Action.LARGE_ICON_KEY))
-                    .filter(Objects::nonNull)
-                    .findFirst();
-            // Java 9: use Optional.or
-            return taggingPresetIcon.isPresent() ? taggingPresetIcon : Optional.ofNullable(MapPaintStyles.getNodeIcon(tag, false));
+        protected Optional<ImageIcon> findIcon(String key, String value) {
+            final Iterator<OsmPrimitive> osmPrimitiveIterator = sel.iterator();
+            final OsmPrimitive virtual = (osmPrimitiveIterator.hasNext() ? osmPrimitiveIterator.next().getType() : OsmPrimitiveType.NODE)
+                    .newInstance(0, false);
+            virtual.put(key, value);
+            final ImageIcon padded = ImageProvider.getPadded(virtual, ImageProvider.ImageSizes.LARGEICON.getImageDimension(),
+                    EnumSet.of(ImageProvider.GetPaddedOptions.NO_DEFAULT, ImageProvider.GetPaddedOptions.NO_DEPRECATED));
+            return Optional.ofNullable(padded);
         }
 
@@ -963,5 +964,5 @@
                     action.setEnabled(false);
                 }
-                ImageIcon icon = findIcon(t)
+                ImageIcon icon = findIcon(t.getKey(), t.getValue())
                         // If still nothing display an empty icon
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 15888)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 15889)
@@ -7,4 +7,5 @@
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.EnumSet;
 import java.util.LinkedList;
 import java.util.List;
@@ -20,7 +21,4 @@
 import org.openstreetmap.josm.data.preferences.sources.SourceEntry;
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
-import org.openstreetmap.josm.gui.mappaint.styleelement.MapImage;
-import org.openstreetmap.josm.gui.mappaint.styleelement.NodeElement;
-import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement;
 import org.openstreetmap.josm.io.CachedFile;
 import org.openstreetmap.josm.io.FileWatcher;
@@ -215,43 +213,21 @@
      * @param tag The tag to look an icon for
      * @return {@code null} if no icon found
-     */
+     * @deprecated use {@link ImageProvider#getPadded}
+     */
+    @Deprecated
     public static ImageIcon getNodeIcon(Tag tag) {
-        return getNodeIcon(tag, true);
-    }
-
-    /**
-     * Returns the node icon that would be displayed for the given tag.
-     * @param tag The tag to look an icon for
-     * @param includeDeprecatedIcon if {@code true}, the special deprecated icon will be returned if applicable
-     * @return {@code null} if no icon found, or if the icon is deprecated and not wanted
-     */
-    public static ImageIcon getNodeIcon(Tag tag, boolean includeDeprecatedIcon) {
         if (tag != null) {
             DataSet ds = new DataSet();
             Node virtualNode = new Node(LatLon.ZERO);
             virtualNode.put(tag.getKey(), tag.getValue());
-            StyleElementList styleList;
             MapCSSStyleSource.STYLE_SOURCE_LOCK.readLock().lock();
             try {
                 // Add primitive to dataset to avoid DataIntegrityProblemException when evaluating selectors
                 ds.addPrimitive(virtualNode);
-                styleList = getStyles().generateStyles(virtualNode, 0.5, false).a;
+                return ImageProvider.getPadded(virtualNode, ImageProvider.ImageSizes.SMALLICON.getImageDimension(),
+                        EnumSet.of(ImageProvider.GetPaddedOptions.NO_PRESETS, ImageProvider.GetPaddedOptions.NO_DEFAULT));
+            } finally {
                 ds.removePrimitive(virtualNode);
-            } finally {
                 MapCSSStyleSource.STYLE_SOURCE_LOCK.readLock().unlock();
-            }
-            if (styleList != null) {
-                for (StyleElement style : styleList) {
-                    if (style instanceof NodeElement) {
-                        MapImage mapImage = ((NodeElement) style).mapImage;
-                        if (mapImage != null) {
-                            if (includeDeprecatedIcon || mapImage.name == null || !DEPRECATED_IMAGE_NAMES.contains(mapImage.name)) {
-                                return new ImageIcon(mapImage.getImage(false));
-                            } else {
-                                return null; // Deprecated icon found but not wanted
-                            }
-                        }
-                    }
-                }
             }
         }
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 15888)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 15889)
@@ -35,5 +35,7 @@
 import java.util.Base64;
 import java.util.Collection;
+import java.util.Comparator;
 import java.util.EnumMap;
+import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Hashtable;
@@ -43,5 +45,5 @@
 import java.util.Map;
 import java.util.Objects;
-import java.util.TreeSet;
+import java.util.Optional;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ConcurrentHashMap;
@@ -63,4 +65,7 @@
 import javax.xml.parsers.ParserConfigurationException;
 
+import com.kitfox.svg.SVGDiagram;
+import com.kitfox.svg.SVGException;
+import com.kitfox.svg.SVGUniverse;
 import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -85,8 +90,4 @@
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.DefaultHandler;
-
-import com.kitfox.svg.SVGDiagram;
-import com.kitfox.svg.SVGException;
-import com.kitfox.svg.SVGUniverse;
 
 /**
@@ -308,5 +309,5 @@
 
     /** larger cache of critical padded image icons used in many parts of the application */
-    private static final Map<Dimension, Map<MapImage, ImageIcon>> paddedImageCache = new HashMap<>();
+    private static final Map<Dimension, Map<Image, ImageIcon>> paddedImageCache = new HashMap<>();
 
     private static final ExecutorService IMAGE_FETCHER =
@@ -1493,4 +1494,27 @@
 
     /**
+     * Options used in {@link #getPadded(OsmPrimitive, Dimension, Collection)}.
+     * @since 15889
+     */
+    public enum GetPaddedOptions {
+        /**
+         * Exclude icon indicating deprecated tag usage.
+         */
+        NO_DEPRECATED,
+        /**
+         * Exclude default icon for {@link OsmPrimitiveType} from {@link #get(OsmPrimitiveType)}
+         */
+        NO_DEFAULT,
+        /**
+         * Exclude tagging preset icons.
+         */
+        NO_PRESETS,
+        /**
+         * Exclude tagging preset icons for {@linkplain OsmPrimitiveType#WAY ways}.
+         */
+        NO_WAY_PRESETS,
+    }
+
+    /**
      * @param primitive Object for which an icon shall be fetched. The icon is chosen based on tags.
      * @param iconSize Target size of icon. Icon is padded if required.
@@ -1499,7 +1523,18 @@
      */
     public static ImageIcon getPadded(OsmPrimitive primitive, Dimension iconSize) {
+        return getPadded(primitive, iconSize, EnumSet.of(GetPaddedOptions.NO_WAY_PRESETS));
+    }
+
+    /**
+     * @param primitive Object for which an icon shall be fetched. The icon is chosen based on tags.
+     * @param iconSize Target size of icon. Icon is padded if required.
+     * @param options zero or more {@linkplain GetPaddedOptions options}.
+     * @return Icon for {@code primitive} that fits in cell or {@code null}.
+     * @since 15889
+     */
+    public static ImageIcon getPadded(OsmPrimitive primitive, Dimension iconSize, Collection<GetPaddedOptions> options) {
         // Check if the current styles have special icon for tagged objects.
         if (primitive.isTagged()) {
-            ImageIcon icon = getTaggedPadded(primitive, iconSize);
+            ImageIcon icon = getTaggedPadded(primitive, iconSize, options);
             if (icon != null) {
                 return icon;
@@ -1508,20 +1543,20 @@
 
         // Check if the presets have icons for nodes/relations.
-        if (OsmPrimitiveType.WAY != primitive.getType()) {
-            final Collection<TaggingPreset> presets = new TreeSet<>((o1, o2) -> {
-                final int o1TypesSize = o1.types == null || o1.types.isEmpty() ? Integer.MAX_VALUE : o1.types.size();
-                final int o2TypesSize = o2.types == null || o2.types.isEmpty() ? Integer.MAX_VALUE : o2.types.size();
-                return Integer.compare(o1TypesSize, o2TypesSize);
-            });
-            presets.addAll(TaggingPresets.getMatchingPresets(primitive));
-            for (final TaggingPreset preset : presets) {
-                if (preset.getIcon() != null) {
-                    return preset.getIcon();
-                }
+        if (!options.contains(GetPaddedOptions.NO_WAY_PRESETS) || OsmPrimitiveType.WAY != primitive.getType()) {
+            final Optional<ImageIcon> icon = TaggingPresets.getMatchingPresets(primitive).stream()
+                    .sorted(Comparator.comparing(p -> p.types == null || p.types.isEmpty() ? Integer.MAX_VALUE : p.types.size()))
+                    .map(TaggingPreset::getIcon)
+                    .filter(Objects::nonNull)
+                    .map(imageIcon -> getPaddedIcon(imageIcon.getImage(), iconSize))
+                    .findFirst();
+            if (icon.isPresent()) {
+                return icon.get();
             }
         }
 
         // Use generic default icon.
-        return ImageProvider.get(primitive.getDisplayType());
+        return options.contains(GetPaddedOptions.NO_DEFAULT)
+                ? null
+                : getPaddedIcon(get(primitive.getDisplayType()).getImage(), iconSize);
     }
 
@@ -1531,7 +1566,8 @@
      * @param primitive tagged OSM primitive
      * @param iconSize icon size in pixels
+     * @param options zero or more {@linkplain GetPaddedOptions options}.
      * @return a new padded icon for the given tagged primitive, or null
      */
-    private static ImageIcon getTaggedPadded(OsmPrimitive primitive, Dimension iconSize) {
+    private static ImageIcon getTaggedPadded(OsmPrimitive primitive, Dimension iconSize, Collection<GetPaddedOptions> options) {
         Pair<StyleElementList, Range> nodeStyles;
         DataSet ds = primitive.getDataSet();
@@ -1550,5 +1586,6 @@
                 NodeElement nodeStyle = (NodeElement) style;
                 MapImage icon = nodeStyle.mapImage;
-                if (icon != null) {
+                if (icon != null &&
+                        (icon.name == null || !options.contains(GetPaddedOptions.NO_DEPRECATED) || !icon.name.contains("deprecated"))) {
                     return getPaddedIcon(icon, iconSize);
                 }
@@ -1568,15 +1605,18 @@
      */
     public static ImageIcon getPaddedIcon(MapImage mapImage, Dimension iconSize) {
+        return getPaddedIcon(mapImage.getImage(false), iconSize);
+    }
+
+    private static ImageIcon getPaddedIcon(Image mapImage, Dimension iconSize) {
         synchronized (paddedImageCache) {
             return paddedImageCache.computeIfAbsent(iconSize, x -> new HashMap<>()).computeIfAbsent(mapImage, icon -> {
                 int backgroundRealWidth = GuiSizesHelper.getSizeDpiAdjusted(iconSize.width);
                 int backgroundRealHeight = GuiSizesHelper.getSizeDpiAdjusted(iconSize.height);
-                int iconRealWidth = icon.getWidth();
-                int iconRealHeight = icon.getHeight();
+                int iconRealWidth = icon.getWidth(null);
+                int iconRealHeight = icon.getHeight(null);
                 BufferedImage image = new BufferedImage(backgroundRealWidth, backgroundRealHeight, BufferedImage.TYPE_INT_ARGB);
                 double scaleFactor = Math.min(
                         backgroundRealWidth / (double) iconRealWidth,
                         backgroundRealHeight / (double) iconRealHeight);
-                Image iconImage = icon.getImage(false);
                 Image scaledIcon;
                 final int scaledWidth;
@@ -1586,10 +1626,10 @@
                     scaledWidth = (int) (iconRealWidth * scaleFactor);
                     scaledHeight = (int) (iconRealHeight * scaleFactor);
-                    scaledIcon = iconImage.getScaledInstance(scaledWidth, scaledHeight, Image.SCALE_SMOOTH);
+                    scaledIcon = icon.getScaledInstance(scaledWidth, scaledHeight, Image.SCALE_SMOOTH);
                 } else {
                     // Use original size, don't upscale.
                     scaledWidth = iconRealWidth;
                     scaledHeight = iconRealHeight;
-                    scaledIcon = iconImage;
+                    scaledIcon = icon;
                 }
                 image.getGraphics().drawImage(scaledIcon,
