Skip to content

Commit

Permalink
Fixed the failure of a compability with new JOSM version
Browse files Browse the repository at this point in the history
Fixed the failure of a compability with JOSM versions released after the February of 2022 year
Small fixes
  • Loading branch information
bwr57 committed Nov 27, 2022
1 parent 6d61f31 commit ee33d9a
Show file tree
Hide file tree
Showing 26 changed files with 29 additions and 6 deletions.
23 changes: 23 additions & 0 deletions JOSM-CustomizePublicTransportStop.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/images" type="java-resource" relativeOutputPath="images" />
<sourceFolder url="file://$MODULE_DIR$/data" type="java-resource" relativeOutputPath="data" />
</content>
<orderEntry type="jdk" jdkName="17" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../josm-tested (2).jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified data/cs.lang
Binary file not shown.
Binary file modified data/fr.lang
Binary file not shown.
Binary file modified data/hu.lang
Binary file not shown.
Binary file modified data/id.lang
Binary file not shown.
Binary file modified data/it.lang
Binary file not shown.
Binary file added data/ko.lang
Binary file not shown.
Binary file modified data/lt.lang
Binary file not shown.
Binary file modified data/sk.lang
Binary file not shown.
Binary file modified data/uk.lang
Binary file not shown.
Binary file modified data/zh_CN.lang
Binary file not shown.
Binary file modified data/zh_TW.lang
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ protected NearestWaySegment getNearestWaySegment(LatLon platformCoord, StopArea
dist_waySegments = getNearestWaySegmentsImpl(p);
for (Map.Entry<Double, List<WaySegment>> entry : dist_waySegments.entrySet()) {
for (WaySegment waySegment : entry.getValue()) {
if (testWay(waySegment.way, stopArea)) {
if (testWay(waySegment.getWay(), stopArea)) {
Node n = waySegment.getFirstNode();
Node lastN = waySegment.getSecondNode();

Expand Down Expand Up @@ -298,11 +298,11 @@ protected NearestWaySegment getNearestWaySegment(LatLon platformCoord, StopArea
*/
protected Node createNodeOnWay(Node newStopNode, WaySegment waySegment) {
UndoRedoHandler.getInstance().add(new AddCommand(MainApplication.getLayerManager().getEditDataSet(), newStopNode));
List<Node> wayNodes = waySegment.way.getNodes();
wayNodes.add(waySegment.lowerIndex + 1, newStopNode);
Way newWay = new Way(waySegment.way);
List<Node> wayNodes = waySegment.getWay().getNodes();
wayNodes.add(waySegment.getLowerIndex() + 1, newStopNode);
Way newWay = new Way(waySegment.getWay());
newWay.setNodes(wayNodes);
UndoRedoHandler.getInstance().add(new ChangeCommand(waySegment.way, newWay));
UndoRedoHandler.getInstance().add(new ChangeCommand(waySegment.getWay(), newWay));
return newStopNode;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ else if (isFirst && !stopArea.isBusStation)
commands = assignTag(commands, target, OSMTags.AREA_TAG, stopArea.isArea ? OSMTags.YES_TAG_VALUE : null,
OSMTags.NO_TAG_VALUE, stopArea.isSetDefaultValues);
commands = assignTag(commands, target, OSMTags.LAYER_TAG,
null == stopArea.layer || "0".equals(stopArea.layer) ? null : stopArea.service);
null == stopArea.layer || "0".equals(stopArea.layer) ? null : stopArea.layer);
commands = assignTag(commands, target, OSMTags.SURFACE_TAG,
null == stopArea.surface || OSMTags.UNKNOWN_TAG_VALUE.equals(stopArea.surface) ? null :
stopArea.surface,
Expand Down

0 comments on commit ee33d9a

Please sign in to comment.