Changeset 15924 in josm


Ignore:
Timestamp:
2020-02-24T21:44:35+01:00 (5 weeks ago)
Author:
Don-vip
Message:

fix #18761 - only consider source=survey for local GPX files, not the public ones

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r15759 r15924  
    545545    public String getChangesetSourceTag() {
    546546        // no i18n for international values
    547         return "survey";
     547        return isLocalFile ? "survey" : null;
    548548    }
    549549}
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java

    r15496 r15924  
    239239        }
    240240    }
     241
     242    /**
     243     * Unit test of {@link GpxLayer#getChangesetSourceTag}.
     244     */
     245    @Test
     246    public void testGetChangesetSourceTag() {
     247        assertEquals("survey", new GpxLayer(new GpxData(), "", true).getChangesetSourceTag());
     248        assertNull(new GpxLayer(new GpxData(), "", false).getChangesetSourceTag());
     249    }
    241250}
Note: See TracChangeset for help on using the changeset viewer.