kopia lustrzana https://github.com/JOSM/MapWithAI
Update primitive id generation for JOSM 15820
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
b7a19df0cc
commit
dadda286d5
|
@ -127,6 +127,7 @@ jacocoTestCoverageVerification {
|
||||||
|
|
||||||
josm {
|
josm {
|
||||||
manifest {
|
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 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 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")
|
oldVersionDownloadLink 15233, "v0.2.10", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v0.2.10/mapwithai.jar")
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# The minimum JOSM version this plugin is compatible with (can be any numeric version
|
# 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
|
# The JOSM version this plugin is currently compiled against
|
||||||
# Please make sure this version is available at https://josm.openstreetmap.de/download
|
# 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.
|
# 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.canloadatruntime = true
|
||||||
plugin.author = Taylor Smock <incoming+gokaart/JOSM_MapWithAI@incoming.gitlab.com>
|
plugin.author = Taylor Smock <incoming+gokaart/JOSM_MapWithAI@incoming.gitlab.com>
|
||||||
plugin.class = org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin
|
plugin.class = org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin
|
||||||
|
|
|
@ -3,7 +3,6 @@ package org.openstreetmap.josm.plugins.mapwithai.backend;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
import org.openstreetmap.josm.data.osm.AbstractPrimitive;
|
|
||||||
import org.openstreetmap.josm.data.osm.DataSet;
|
import org.openstreetmap.josm.data.osm.DataSet;
|
||||||
import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
||||||
import org.openstreetmap.josm.data.osm.PrimitiveData;
|
import org.openstreetmap.josm.data.osm.PrimitiveData;
|
||||||
|
@ -32,11 +31,11 @@ public class OsmReaderCustom extends OsmReader {
|
||||||
@Override
|
@Override
|
||||||
protected OsmPrimitive buildPrimitive(PrimitiveData pd) {
|
protected OsmPrimitive buildPrimitive(PrimitiveData pd) {
|
||||||
final Long serverId = pd.getUniqueId();
|
final Long serverId = pd.getUniqueId();
|
||||||
if (AbstractPrimitive.currentUniqueId() < pd.getUniqueId()) {
|
if (pd.getIdGenerator().currentUniqueId() < pd.getUniqueId()) {
|
||||||
Logging.trace("Current id: {0} (wants {1})", AbstractPrimitive.currentUniqueId(), pd.getUniqueId());
|
Logging.trace("Current id: {0} (wants {1})", pd.getIdGenerator().currentUniqueId(), pd.getUniqueId());
|
||||||
}
|
}
|
||||||
OsmPrimitive p;
|
OsmPrimitive p;
|
||||||
if (pd.getUniqueId() < AbstractPrimitive.currentUniqueId()) {
|
if (pd.getUniqueId() < pd.getIdGenerator().currentUniqueId()) {
|
||||||
p = pd.getType().newInstance(pd.getUniqueId(), true);
|
p = pd.getType().newInstance(pd.getUniqueId(), true);
|
||||||
} else {
|
} else {
|
||||||
p = pd.getType().newVersionedInstance(pd.getId(), pd.getVersion());
|
p = pd.getType().newVersionedInstance(pd.getId(), pd.getVersion());
|
||||||
|
|
Ładowanie…
Reference in New Issue