Last change
on this file since 104 was 104, checked in by imi, 18 years ago |
- started i18n
- started "download incomplete ways" action
- added straight line selection mode
|
File size:
803 bytes
|
Line | |
---|
1 | package org.openstreetmap.josm.data.conflict;
|
---|
2 |
|
---|
3 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
4 |
|
---|
5 | import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
---|
6 | import org.openstreetmap.josm.data.osm.Segment;
|
---|
7 |
|
---|
8 | public class ToConflict extends ConflictItem {
|
---|
9 |
|
---|
10 | @Override public boolean hasConflict(OsmPrimitive key, OsmPrimitive value) {
|
---|
11 | return key instanceof Segment && !((Segment)key).to.equals(((Segment)value).to);
|
---|
12 | }
|
---|
13 |
|
---|
14 | @Override protected String str(OsmPrimitive osm) {
|
---|
15 | return osm instanceof Segment ? String.valueOf(((Segment)osm).to.id) : null;
|
---|
16 | }
|
---|
17 |
|
---|
18 | @Override public String key() {
|
---|
19 | return "segment|"+tr("to");
|
---|
20 | }
|
---|
21 |
|
---|
22 | @Override public void apply(OsmPrimitive target, OsmPrimitive other) {
|
---|
23 | if (target instanceof Segment)
|
---|
24 | ((Segment)target).to = ((Segment)other).to;
|
---|
25 | }
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.