Changeset 4862 in josm


Ignore:
Timestamp:
2012-01-23T23:23:26+01:00 (8 years ago)
Author:
Don-vip
Message:

fix #7268 - IndexOutOfBoundsException problem in the "History" window

File:
1 edited

Legend:

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

    r4779 r4862  
    1616
    1717import javax.swing.DefaultCellEditor;
    18 import javax.swing.DefaultListSelectionModel;
    1918import javax.swing.JCheckBox;
    2019import javax.swing.JLabel;
     
    2221import javax.swing.JRadioButton;
    2322import javax.swing.JTable;
    24 import javax.swing.ListSelectionModel;
    2523import javax.swing.SwingConstants;
    2624import javax.swing.UIManager;
    27 import javax.swing.event.ListSelectionEvent;
    28 import javax.swing.event.ListSelectionListener;
    2925import javax.swing.event.TableModelEvent;
    3026import javax.swing.event.TableModelListener;
     
    9086        HistoryBrowserModel.VersionTableModel model = getVersionTableModel();
    9187        int row = rowAtPoint(evt.getPoint());
    92         if (!model.isLatest(row)) {
     88        if (row > -1 && !model.isLatest(row)) {
    9389            HistoryOsmPrimitive primitive = model.getPrimitive(row);
    9490            popupMenu.prepare(primitive);
Note: See TracChangeset for help on using the changeset viewer.