Changeset 16600 in josm for trunk/src


Ignore:
Timestamp:
2020-06-11T14:19:07+02:00 (4 years ago)
Author:
simon04
Message:

see #19330 - SelectionSynchronizer: do not interpolate selection interval gaps

File:
1 edited

Legend:

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

    r15769 r16600  
    99import javax.swing.event.ListSelectionEvent;
    1010import javax.swing.event.ListSelectionListener;
     11
     12import org.openstreetmap.josm.gui.util.TableHelper;
    1113
    1214/**
     
    5153        preventRecursion = true;
    5254        DefaultListSelectionModel referenceModel = (DefaultListSelectionModel) e.getSource();
    53         int i = referenceModel.getMinSelectionIndex();
    54         int j = referenceModel.getMaxSelectionIndex();
    5555        for (ListSelectionModel model : participants) {
    5656            if (model == e.getSource()) {
    5757                continue;
    5858            }
    59             model.setSelectionInterval(i, j);
     59            model.clearSelection();
     60            for (int i : TableHelper.getSelectedIndices(referenceModel)) {
     61                model.addSelectionInterval(i, i);
     62            }
    6063        }
    6164        preventRecursion = false;
Note: See TracChangeset for help on using the changeset viewer.