Ticket #4161: new_patch.diff

File new_patch.diff, 3.0 KB (added by Don-vip, 13 years ago)
  • core/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java

     
    6161        }
    6262    }
    6363
    64     protected void addChangeset(Changeset changeset) {
    65         if (shownChangesets.add(changeset)) {
    66             setChangesets(shownChangesets);
    67             updateModel();
    68         }
    69     }
    70 
    71     protected void removeChangeset(Changeset changeset) {
    72         if (shownChangesets.remove(changeset)) {
    73             setChangesets(shownChangesets);
    74             updateModel();
    75         }
    76     }
    77 
    7864    protected void setChangesets(Collection<Changeset> changesets) {
    7965        shownChangesets.clear();
    8066        if (changesets != null) {
  • core/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetsInActiveDataLayerListModel.java

     
    33
    44import javax.swing.DefaultListSelectionModel;
    55
    6 import org.openstreetmap.josm.data.osm.Changeset;
    7 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    86import org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent;
    9 import org.openstreetmap.josm.data.osm.event.ChangesetIdChangedEvent;
    107import org.openstreetmap.josm.data.osm.event.DataChangedEvent;
    118import org.openstreetmap.josm.data.osm.event.DataSetListener;
    129import org.openstreetmap.josm.data.osm.event.NodeMovedEvent;
     
    3532        initFromDataSet(event.getDataset());
    3633    }
    3734
    38     public void primitivesAdded(PrimitivesAddedEvent event) {
    39         for (OsmPrimitive primitive:event.getPrimitives()) {
    40             addChangeset(new Changeset(primitive.getChangesetId()));
    41         }
    42     }
     35    public void primitivesAdded(PrimitivesAddedEvent event) {/* ignored */}
    4336
    44     public void primitivesRemoved(PrimitivesRemovedEvent event) {
    45         for (OsmPrimitive primitive:event.getPrimitives()) {
    46             removeChangeset(new Changeset(primitive.getChangesetId()));
    47         }
    48     }
     37    public void primitivesRemoved(PrimitivesRemovedEvent event) {/* ignored */}
    4938
    50     public void otherDatasetChange(AbstractDatasetChangedEvent event) {
    51         if (event instanceof ChangesetIdChangedEvent) {
    52             ChangesetIdChangedEvent e = (ChangesetIdChangedEvent) event;
    53             removeChangeset(new Changeset(e.getOldChangesetId()));
    54             addChangeset(new Changeset(e.getNewChangesetId()));
    55         }
    56     }
     39    public void otherDatasetChange(AbstractDatasetChangedEvent event) {/* ignored */}
    5740
    5841    public void nodeMoved(NodeMovedEvent event) {/* ignored */}
    5942