Changeset 8473 in josm


Ignore:
Timestamp:
2015-06-07T13:58:40+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #11533 - proper use of Storage class in NoteData

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/upload/UploadNotesTask.java

    r8464 r8473  
    8989                    }
    9090                    newNote = api.createNote(note.getLatLon(), comment.getText(), monitor);
    91                     note.setId(newNote.getId());
    9291                    break;
    9392                case closed:
  • trunk/src/org/openstreetmap/josm/data/osm/NoteData.java

    r8380 r8473  
    291291            Note oldNote = entry.getKey();
    292292            Note newNote = entry.getValue();
     293            boolean reindex = oldNote.hashCode() != newNote.hashCode();
     294            if (reindex) {
     295                noteList.removeElem(oldNote);
     296            }
    293297            oldNote.updateWith(newNote);
     298            if (reindex) {
     299                noteList.add(oldNote);
     300            }
    294301        }
    295302        dataUpdated();
Note: See TracChangeset for help on using the changeset viewer.