kopia lustrzana https://github.com/JOSM/MapWithAI
Workaround the merge key dialog popup by removing the building key and adding it again (for tests)
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
2656173cc3
commit
2e3b90d3eb
|
@ -80,7 +80,17 @@ public class MergeAddressBuildings extends AbstractConflationCommand {
|
|||
|
||||
final List<Command> commandList = new ArrayList<>();
|
||||
if (nodesWithAddresses.size() == 1) {
|
||||
commandList.add(ReplaceGeometryUtils.buildUpgradeNodeCommand(nodesWithAddresses.get(0), object));
|
||||
String currentKey = null;
|
||||
try {
|
||||
// Remove the key to avoid the popup from utilsplugin2
|
||||
currentKey = object.get(BUILDING_KEY);
|
||||
object.remove(BUILDING_KEY);
|
||||
commandList.add(ReplaceGeometryUtils.buildUpgradeNodeCommand(nodesWithAddresses.get(0), object));
|
||||
} finally {
|
||||
if (currentKey != null) {
|
||||
object.put(BUILDING_KEY, currentKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
return commandList;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue