Changeset 2556 in josm for trunk


Ignore:
Timestamp:
2009-12-01T09:19:01+01:00 (15 years ago)
Author:
Gubaer
Message:

applied #4063: patch by mjulius: Exception in History dialog

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r2512 r2556  
    438438
    439439        public HistoryOsmPrimitive getPrimitive(int row) {
    440             return history.get(row);
     440            return isLatest(row) ? latest : history.get(row);
    441441        }
    442442
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java

    r2512 r2556  
    6767        public void mouseClicked(MouseEvent e) {
    6868            switch(e.getClickCount()) {
    69                 case 2: handleDoubleClick(e); break;
     69            case 2: handleDoubleClick(e); break;
    7070            }
    7171        }
     
    9191            row = rowAtPoint(evt.getPoint());
    9292        }
    93         HistoryOsmPrimitive primitive = model.getPrimitive(row);
    94         popupMenu.prepare(primitive);
    95         popupMenu.show(evt.getComponent(), evt.getX(), evt.getY());
     93        if (!model.isLatest(row)) {
     94            HistoryOsmPrimitive primitive = model.getPrimitive(row);
     95            popupMenu.prepare(primitive);
     96            popupMenu.show(evt.getComponent(), evt.getX(), evt.getY());
     97        }
    9698    }
    9799
Note: See TracChangeset for help on using the changeset viewer.