Ignore:
Timestamp:
2013-05-13T03:10:05+02:00 (11 years ago)
Author:
Don-vip
Message:
  • Improve PopupMenuLauncher to automatically select JTable/JList/JTree line under cursor
  • Simplify all popup menus with this new feature
  • Remove custom popup menus in BoundingBoxSelection and BoundingBoxSelection to use default text field popup menus recently introduced
  • Fix EDT violations in changeset window
  • Make Autoscale actions publicly available in MainMenu
  • Add a new "Zoom to problem" mode in AutoScaleAction
  • Make "Zoom to problem" menu item in validator dialog use this new feature
  • Update enabled state of "Zoom to Conflict" and "Zoom to problem" against selection of conflict/validator dialog
File:
1 edited

Legend:

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

    r5890 r5958  
    1919import org.openstreetmap.josm.data.osm.ChangesetCacheEvent;
    2020import org.openstreetmap.josm.data.osm.ChangesetCacheListener;
     21import org.openstreetmap.josm.gui.util.GuiHelper;
    2122
    2223/**
     
    104105     */
    105106    public void setSelectedChangesets(Collection<Changeset> selected) {
    106         selectionModel.clearSelection();
     107        GuiHelper.runInEDTAndWait(new Runnable() {
     108            @Override public void run() {
     109                selectionModel.clearSelection();
     110            }
     111        });
    107112        if (selected == null || selected.isEmpty())
    108113            return;
    109114        for (Changeset cs: selected) {
    110             int idx = data.indexOf(cs);
     115            final int idx = data.indexOf(cs);
    111116            if (idx >= 0) {
    112                 selectionModel.addSelectionInterval(idx,idx);
     117                GuiHelper.runInEDTAndWait(new Runnable() {
     118                    @Override public void run() {
     119                        selectionModel.addSelectionInterval(idx,idx);
     120                    }
     121                });
    113122            }
    114123        }
    115     }
    116 
    117     /**
    118      * Selects the changeset displayed at row <code>row</code>
    119      *
    120      * @param row the row. Ignored if < 0 or >= {@link #getRowCount()}
    121      */
    122     public void setSelectedByIdx(int row) {
    123         if (row < 0 || row >= getRowCount()) return;
    124         selectionModel.setSelectionInterval(row, row);
    125124    }
    126125
Note: See TracChangeset for help on using the changeset viewer.