Changeset 7882 in josm for trunk/src/org


Ignore:
Timestamp:
2014-12-25T15:07:44+01:00 (10 years ago)
Author:
Don-vip
Message:

fix #10606 - add ID of notes (patch by ToeBee)

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java

    r7852 r7882  
    227227                String toolTipText = userName + " @ " + sdf.format(note.getCreatedAt());
    228228                JLabel jlabel = (JLabel)comp;
    229                 jlabel.setText(text);
     229                jlabel.setText(note.getId() + ": " +text);
    230230                ImageIcon icon;
    231231                if (note.getId() < 0) {
  • trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java

    r7852 r7882  
    111111        if (noteData.getSelectedNote() != null) {
    112112            StringBuilder sb = new StringBuilder("<html>");
     113            sb.append(tr("Note"));
     114            sb.append(" " + noteData.getSelectedNote().getId());
    113115            List<NoteComment> comments = noteData.getSelectedNote().getComments();
    114             String sep = "";
    115116            SimpleDateFormat dayFormat = new SimpleDateFormat("MMM d, yyyy");
    116117            for (NoteComment comment : comments) {
     
    118119                //closing a note creates an empty comment that we don't want to show
    119120                if (commentText != null && commentText.trim().length() > 0) {
    120                     sb.append(sep);
     121                    sb.append("<hr/>");
    121122                    String userName = XmlWriter.encode(comment.getUser().getName());
    122123                    if (userName == null || userName.trim().length() == 0) {
     
    131132                    sb.append(htmlText);
    132133                }
    133                 sep = "<hr/>";
    134134            }
    135135            sb.append("</html>");
Note: See TracChangeset for help on using the changeset viewer.