Index: /trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterManager.java	(revision 12406)
+++ /trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterManager.java	(revision 12407)
@@ -18,4 +18,6 @@
 import java.util.TreeSet;
 import java.util.function.Consumer;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import org.openstreetmap.josm.Main;
@@ -175,17 +177,31 @@
         if (ds != null) {
             BBox bbox = Main.map.mapView.getState().getViewArea().getLatLonBoundsBox().toBBox();
-            Consumer<OsmPrimitive> consumer = o -> {
-                String value = o.get(key);
-                if (value != null) {
-                    for (String v : value.split(";")) {
+            Consumer<OsmPrimitive> consumer = getTagValuesConsumer(key, values);
+            ds.searchNodes(bbox).forEach(consumer);
+            ds.searchWays(bbox).forEach(consumer);
+            ds.searchRelations(bbox).forEach(consumer);
+        }
+        return values;
+    }
+
+    static Consumer<OsmPrimitive> getTagValuesConsumer(String key, Set<String> values) {
+        return o -> {
+            String value = o.get(key);
+            if (value != null) {
+                Pattern p = Pattern.compile("(-?[0-9]+)-(-?[0-9]+)");
+                for (String v : value.split(";")) {
+                    Matcher m = p.matcher(v);
+                    if (m.matches()) {
+                        int a = Integer.parseInt(m.group(1));
+                        int b = Integer.parseInt(m.group(2));
+                        for (int i = Math.min(a, b); i <= Math.max(a, b); i++) {
+                            values.add(Integer.toString(i));
+                        }
+                    } else {
                         values.add(v);
                     }
                 }
-            };
-            ds.searchNodes(bbox).forEach(consumer);
-            ds.searchWays(bbox).forEach(consumer);
-            ds.searchRelations(bbox).forEach(consumer);
-        }
-        return values;
+            }
+        };
     }
 
Index: /trunk/test/unit/org/openstreetmap/josm/gui/autofilter/AutoFilterManagerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/autofilter/AutoFilterManagerTest.java	(revision 12407)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/autofilter/AutoFilterManagerTest.java	(revision 12407)
@@ -0,0 +1,49 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.autofilter;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.function.Consumer;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.OsmUtils;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+/**
+ * Unit tests of {@link AutoFilterManager} class.
+ */
+public class AutoFilterManagerTest {
+
+    /**
+     * Setup tests
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules();
+
+    /**
+     * Unit test of {@link AutoFilterManager#getTagValuesConsumer}.
+     */
+    @Test
+    public void testTagValuesConsumer() {
+        Set<String> values = new TreeSet<>();
+        Consumer<OsmPrimitive> consumer = AutoFilterManager.getTagValuesConsumer("level", values);
+        Arrays.asList(
+                OsmUtils.createPrimitive("way level=-4--5"),
+                OsmUtils.createPrimitive("way level=-2"),
+                OsmUtils.createPrimitive("node level=0"),
+                OsmUtils.createPrimitive("way level=1"),
+                OsmUtils.createPrimitive("way level=2;3"),
+                OsmUtils.createPrimitive("way level=6-9"),
+                OsmUtils.createPrimitive("way level=10;12-13")
+                ).forEach(consumer);
+        assertEquals(new TreeSet<>(Arrays.asList("-5", "-4", "-2", "0", "1", "2", "3", "6", "7", "8", "9", "10", "12", "13")), values);
+    }
+}
