Update primitive id generation for JOSM 15820

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-02-06 07:36:21 -07:00
rodzic b7a19df0cc
commit dadda286d5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -127,6 +127,7 @@ jacocoTestCoverageVerification {
josm {
manifest {
oldVersionDownloadLink 15737, "v1.2.3", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.2.3/mapwithai.jar")
oldVersionDownloadLink 15609, "v1.1.8", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.1.8/mapwithai.jar")
oldVersionDownloadLink 15542, "v1.0.5", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.0.5/mapwithai.jar")
oldVersionDownloadLink 15233, "v0.2.10", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v0.2.10/mapwithai.jar")

Wyświetl plik

@ -1,9 +1,9 @@
# The minimum JOSM version this plugin is compatible with (can be any numeric version
plugin.main.version = 15737
plugin.main.version = 15820
# The JOSM version this plugin is currently compiled against
# Please make sure this version is available at https://josm.openstreetmap.de/download
# The special values "latest" and "tested" are also possible here, but not recommended.
plugin.compile.version = 15737
plugin.compile.version = 15820
plugin.canloadatruntime = true
plugin.author = Taylor Smock <incoming+gokaart/JOSM_MapWithAI@incoming.gitlab.com>
plugin.class = org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin

Wyświetl plik

@ -3,7 +3,6 @@ package org.openstreetmap.josm.plugins.mapwithai.backend;
import java.io.InputStream;
import org.openstreetmap.josm.data.osm.AbstractPrimitive;
import org.openstreetmap.josm.data.osm.DataSet;
import org.openstreetmap.josm.data.osm.OsmPrimitive;
import org.openstreetmap.josm.data.osm.PrimitiveData;
@ -32,11 +31,11 @@ public class OsmReaderCustom extends OsmReader {
@Override
protected OsmPrimitive buildPrimitive(PrimitiveData pd) {
final Long serverId = pd.getUniqueId();
if (AbstractPrimitive.currentUniqueId() < pd.getUniqueId()) {
Logging.trace("Current id: {0} (wants {1})", AbstractPrimitive.currentUniqueId(), pd.getUniqueId());
if (pd.getIdGenerator().currentUniqueId() < pd.getUniqueId()) {
Logging.trace("Current id: {0} (wants {1})", pd.getIdGenerator().currentUniqueId(), pd.getUniqueId());
}
OsmPrimitive p;
if (pd.getUniqueId() < AbstractPrimitive.currentUniqueId()) {
if (pd.getUniqueId() < pd.getIdGenerator().currentUniqueId()) {
p = pd.getType().newInstance(pd.getUniqueId(), true);
} else {
p = pd.getType().newVersionedInstance(pd.getId(), pd.getVersion());