kopia lustrzana https://github.com/JOSM/MapWithAI
Add a version check since color settings are not yet available.
See JOSM-19547 for more information. Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
9b34329209
commit
f40b349d86
|
@ -27,6 +27,7 @@ import java.util.zip.ZipException;
|
|||
import java.util.zip.ZipFile;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import org.openstreetmap.josm.data.Version;
|
||||
import org.openstreetmap.josm.data.osm.DataSet;
|
||||
import org.openstreetmap.josm.data.osm.IPrimitive;
|
||||
import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
|
||||
|
@ -139,6 +140,12 @@ public class MapPaintUtils {
|
|||
|
||||
/** Add sources to the paint style */
|
||||
public static synchronized void addSourcesToPaintStyle(DataSet ds) {
|
||||
/* TODO Depends upon JOSM-19547 */
|
||||
if (Version.getInstance().getVersion() < 20_000
|
||||
&& Version.getInstance().getVersion() == Version.JOSM_UNKNOWN_VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> sources = ds.allPrimitives().stream().map(MapPaintUtils::getSourceValue).filter(Objects::nonNull)
|
||||
.distinct().collect(Collectors.toList());
|
||||
StyleSource styleSource = getMapWithAIPaintStyle();
|
||||
|
|
Ładowanie…
Reference in New Issue