Changeset 265 in josm


Ignore:
Timestamp:
2007-06-21T12:01:43+02:00 (17 years ago)
Author:
framm
Message:
  • count modifications of anonymous users and display them along with others
File:
1 edited

Legend:

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

    r242 r265  
    3939                }
    4040        };
     41
    4142        private JTable userTable = new JTable(data);
     43
     44    private static User anonymousUser = User.get("(anonymous users)");
    4245                       
    4346        public UserListDialog() {
     
    8083                int all = 0;
    8184                for (OsmPrimitive p : newSelection) {
    82                         if (p.user != null) {
    83                                 UserCount uc = counters.get(p.user);
    84                                 if (uc == null)
    85                                         counters.put(p.user, uc = new UserCount(p.user, 0));
    86                                 uc.count++;
    87                                 all++;
    88                         }
     85            User u = p.user;
     86            if (u == null) u = anonymousUser;
     87            UserCount uc = counters.get(u);
     88            if (uc == null)
     89                counters.put(u, uc = new UserCount(u, 0));
     90            uc.count++;
     91            all++;
    8992                }
    9093                UserCount[] ucArr = new UserCount[counters.size()];
Note: See TracChangeset for help on using the changeset viewer.