Changeset 35762 in osm for applications/editors/josm/plugins/trustosm/src
- Timestamp:
- 2021-05-17T21:12:13+02:00 (4 years ago)
- Location:
- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/data/TrustWay.java
r32533 r35762 8 8 9 9 import org.bouncycastle.openpgp.PGPSignature; 10 import org.openstreetmap.josm.data.osm.IWaySegment; 10 11 import org.openstreetmap.josm.data.osm.Node; 11 12 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 13 import org.openstreetmap.josm.data.osm.Way; 13 import org.openstreetmap.josm. data.osm.WaySegment;14 import org.openstreetmap.josm.tools.Logging; 14 15 15 16 public class TrustWay extends TrustOsmPrimitive { … … 54 55 osm = osmItem; 55 56 } else { 56 System.err.println("Error while creating TrustWay: OsmPrimitive "+osmItem.getUniqueId()+" is not a Way!");57 Logging.error("Error while creating TrustWay: OsmPrimitive "+osmItem.getUniqueId()+" is not a Way!"); 57 58 } 58 59 } … … 74 75 } 75 76 76 public TrustSignatures getSigsOnSegment( WaySegmentseg) {77 public TrustSignatures getSigsOnSegment(IWaySegment<Node, ?> seg) { 77 78 List<Node> nodes = new ArrayList<>(); 78 79 nodes.add(seg.getFirstNode()); -
applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustDialog.java
r34571 r35762 43 43 import org.openstreetmap.josm.data.osm.DataSelectionListener; 44 44 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 45 import org.openstreetmap.josm.data.osm.IWaySegment; 45 46 import org.openstreetmap.josm.data.osm.Node; 46 47 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 88 89 private Collection<? extends OsmPrimitive> osmData; 89 90 90 private final List< WaySegment> selectedSegments = new ArrayList<>();91 private final List<IWaySegment<Node, Way>> selectedSegments = new ArrayList<>(); 91 92 private final List<OsmPrimitive> selectedPrimitives = new ArrayList<>(); 92 93 … … 233 234 seg.getSecondNode().getDisplayName(DefaultNameFormatter.getInstance())); 234 235 TrustSignatures sigs; 235 String id = TrustOsmPrimitive.createUniqueObjectIdentifier(seg. way);236 String id = TrustOsmPrimitive.createUniqueObjectIdentifier(seg.getWay()); 236 237 if (TrustOSMplugin.signedItems.containsKey(id) 237 238 && (sigs = ((TrustWay) TrustOSMplugin.signedItems.get(id)).getSigsOnSegment(seg)) != null) { … … 401 402 nodes.add(seg.getFirstNode()); 402 403 nodes.add(seg.getSecondNode()); 403 Way w = seg. way;404 Way w = seg.getWay(); 404 405 String id = TrustOsmPrimitive.createUniqueObjectIdentifier(w); 405 406 TrustWay trust = TrustOSMplugin.signedItems.containsKey(id) ? … … 449 450 } else if (o instanceof WaySegment) { 450 451 WaySegment seg = (WaySegment) o; 451 String id = TrustOsmPrimitive.createUniqueObjectIdentifier(seg. way);452 String id = TrustOsmPrimitive.createUniqueObjectIdentifier(seg.getWay()); 452 453 if (TrustOSMplugin.signedItems.containsKey(id)) { 453 454 List<Node> nodes = new ArrayList<>(); … … 654 655 655 656 // highlight all selected WaySegments 656 for ( WaySegmentseg : selectedSegments) {657 for (IWaySegment<?, ?> seg : selectedSegments) { 657 658 GeneralPath b = new GeneralPath(); 658 659 Point p1 = mv.getPoint(seg.getFirstNode());
Note:
See TracChangeset
for help on using the changeset viewer.