Changeset 5112 in josm


Ignore:
Timestamp:
2012-03-21T23:53:24+01:00 (13 years ago)
Author:
simon04
Message:

fix #4077 - patch by sfriedle - Unsaved changes pops up when closing JOSM after undoing all changes

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r5002 r5112  
    543543        List<OsmDataLayer> layersWithUnmodifiedChanges = new ArrayList<OsmDataLayer>();
    544544        for (OsmDataLayer l: Main.map.mapView.getLayersOfType(OsmDataLayer.class)) {
    545             if (l.requiresSaveToFile() || l.requiresUploadToServer()) {
     545            if ((l.requiresSaveToFile() || l.requiresUploadToServer()) && l.data.isModified()) {
    546546                layersWithUnmodifiedChanges.add(l);
    547547            }
  • trunk/src/org/openstreetmap/josm/command/AddCommand.java

    r5077 r5112  
    4949    @Override public boolean executeCommand() {
    5050        getLayer().data.addPrimitive(osm);
     51        osm.setModified(true);
    5152        return true;
    5253    }
Note: See TracChangeset for help on using the changeset viewer.